Linux could not find metis.h

二次信任 提交于 2019-12-04 02:21:58

问题


I am trying to install Metis. Since I am working on a public server, I couldn't install it as a root user. So I have installed metis in my account /home/jd/metis.

When I try to execute something, I get

fatal error: metis.h: No such file or directory

I guess the system looks for metis.h under /usr/local/include but couldnt find it there. How do I make linux look for metis.h under /home/jd/metis/include directory?

I added this path to the $PATH variable. But still the same error. Please advise.


回答1:


My advice is to work with cmake. In this question:install metis on unbuntu, I wrote down my cmake file. The command

include_directories("/home/jd/metis/include")

should solve your problem.




回答2:


You may change the environment variable CPLUS_INCLUDE_PATH. For example, add this kind of statement in your ~/.bashrc:

export CPLUS_INCLUDE_PATH=$HOME/metis/include:$CPLUS_INCLUDE_PATH,

then,

source ~/.bashrc

As for dynamic link library(when you install other library such as libevent locally), you may want to change the following two environment variables:

export LIBRARY_PATH=$HOME/libevent/lib:$LIBRARY_PATH

export LD_LIBRARY_PATH=$HOME/libevent/lib:$LD_LIBRARY_PATH



来源:https://stackoverflow.com/questions/37060100/linux-could-not-find-metis-h

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!