[英]How to install METIS on ubuntu
I want to install the METIS package on ubuntu. 我想在ubuntu上安装METIS包。
I tried the instructions on the install.txt file which says to use 我尝试了使用的install.txt文件上的说明
$ make install
which I did, after installing make as well. 在安装make后我做了。
I also tried the 我也试过了
sudo apt-get install metis
which installed it successfully but 哪个安装成功但是
when trying to use it in both cases I get 当我试图在两种情况下使用它时
metis.h: No such file in directory compilation terminated
In case anyone asks I use g++ -I/path/to/file myprogram.cpp to specify the path where metis.h is. 如果有人要求我使用g ++ -I / path / to / file myprogram.cpp来指定metis.h所在的路径。
I believe I haven't done something correct in the installation but I can't determine what it is. 我相信我在安装中没有做正确的事情,但我无法确定它是什么。
Can someone help me with the installation process? 有人可以帮我安装过程吗?
你可以试试sudo apt-get install libmetis-dev
。
BUILD.txt file from metis: 来自metis的BUILD.txt文件:
Building METIS requires CMake 2.8, found at http://www.cmake.org/ , as well as GNU make.
构建METIS需要在http://www.cmake.org/上找到CMake 2.8,以及GNU make。 Assumming CMake and GNU make are installed, two commands should suffice to build metis:
假设安装了CMake和GNU make,两个命令应该足以构建metis:
$ make config
$ make
so, i tried not directly on ubuntu, but on my mac and it works in that order. 所以,我尝试不直接在ubuntu上,但在我的Mac上,它按顺序工作。 after the two make command i have the following folder strucure:
在两个make命令后,我有以下文件夹结构:
build
-Darwin-x86_64 (the build architecture)
-libmetis
-libmetis.a
-programs
-gpmetis
...
after you can call 你打电话之后
make install
I make a little test example and it works. 我做了一个小测试示例,它的工作原理。 You are maybe interest in my CMake-File.
您可能对我的CMake文件感兴趣。 This could be the solution for your problem:
这可能是您的问题的解决方案:
cmake_minimum_required(VERSION 2.8.9)
project (MetisTest)
include_directories("/usr/local/include")
link_directories("/usr/local/lib")
add_executable(metisTest main.cpp)
target_link_libraries(metisTest metis)
You may append your metis installation path to the environment variable CPLUS_INCLUDE_PATH. 您可以将metis安装路径附加到环境变量CPLUS_INCLUDE_PATH。 For example, in your ~/.bashrc, add:
例如,在〜/ .bashrc中,添加:
export CPLUS_INCLUDE_PATH=$HOME/metis/include:$CPLUS_INCLUDE_PATH
then, 然后,
source ~/.bashrc
Please see more in the question Linux could not find metis.h . 请参阅问题中的更多内容Linux找不到metis.h 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.