错误:libtool-编译MPI程序时
我正在使用OpenSuse Leap
,并且以YaST身份安装了openMPI
.运行which mpirun
命令,我得到/usr/lib64/mpi/gcc/openmpi/bin/mpirun
,运行which mpicc
,我得到/usr/bin/mpicc
.
I'm using OpenSuse Leap
and I installed openMPI
thought YaST. Running a which mpirun
command I get /usr/lib64/mpi/gcc/openmpi/bin/mpirun
and running which mpicc
i get /usr/bin/mpicc
.
如何首先确保正确安装了OpenMPI?
How to make sure first that OpenMPI is correctly installed?
第二,我有一个简单的问候世界,我正在处理X程序并正在运行mpicc hello.c
我得到此输出
Second, I have a simple hello world I am process X program and running mpicc hello.c
I get this output
gcc:错误:libtool ::没有这样的文件或目录
gcc: error: libtool:: No such file or directory
gcc:错误:链接::否
gcc: error: link:: No
这样的文件或目录mpicc:没有这样的文件或目录
such file or directory mpicc: No such file or directory
此外,我安装了Eclipse for Parallel Application
并使用了一个内置示例,它在构建时为我提供了此输出
Also, I installed Eclipse for Parallel Application
and used a build-in example and it gives me this output at build
全部制作
建筑目标:你好
调用:GCC C链接器
Invoking: GCC C Linker
mpicc -o"hello" ./src/hello.o
mpicc -o "hello" ./src/hello.o
gcc:错误:libtool ::没有这样的文件或目录
gcc: error: libtool:: No such file or directory
gcc:错误:链接::没有这样的文件或目录
gcc: error: link:: No such file or directory
makefile:30:目标"hello"的配方失败
makefile:30: recipe for target 'hello' failed
mpicc:没有这样的文件或目录
mpicc: No such file or directory
make:*** [hello]错误1
make: *** [hello] Error 1
我检查了YaST,并安装了libtool.
I checked YaST and libtool is installed.
这个答案来得太晚了.我最近有同样的问题.因此,任何来这里寻求答案的人,这就是我如何使其工作的方式.
This answer comes at a time too late. I recently had the same issue. Hence anyone who comes here for an answer, this was how I got it working.
请注意:这是一个出现类似错误的孤立情况
Please note: this is an isolated situation who gets similar error
gcc: error: libtool:: No such file or directory
gcc: error: link:: No such file or directory
mpicc: No such file or directory
首先尝试检查LP建议的解决方案.它将尝试更新您的libtool autoconf和automake.如果您无事可做:
First try to check the solution suggested by LPs. It will try to update your libtool autoconf and automake. If you get nothing to do:
sudo zypper in automake autoconf libtool
root's password:
Loading repository data...
Reading installed packages...
'libtool' is already installed.
No update candidate for 'libtool-2.4.2-15.2.2.x86_64'. The highest available version is already installed.
'autoconf' is already installed.
No update candidate for 'autoconf-2.69-10.1.2.noarch'. The highest available version is already installed.
'automake' is already installed.
No update candidate for 'automake-1.13.4-5.1.2.noarch'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
然后显式添加您的OpemMPI路径变量.
Then explicitly add your OpemMPI path variable.
export PATH=/usr/lib64/mpi/gcc/openmpi/bin:$PATH
这对我有用.祝你好运!
This worked for me. Good luck!