首页 文章

错误:libtool - 编译MPI程序时

提问于
浏览
2

我正在使用 OpenSuse Leap 并且我安装了 openMPI 以为YaST . 运行 which mpirun 命令我得到 /usr/lib64/mpi/gcc/openmpi/bin/mpirun 并运行 which mpicc 我得 /usr/bin/mpicc .

如何确保首先正确安装OpenMPI?

第二,我有一个简单的hello world我正在处理X程序并运行 mpicc hello.c 我得到了这个输出

gcc:错误:libtool ::没有这样的文件或目录gcc:错误:link ::没有这样的文件或目录mpicc:没有这样的文件或目录

另外,我安装了 Eclipse for Parallel Application 并使用了一个内置示例,它在构建时为我提供了这个输出

make all Building target:hello Invoking:GCC C Linker mpicc -o“hello”./ src / hello.o gcc:error:libtool ::没有这样的文件或目录gcc:error:link ::没有这样的文件或目录makefile :30:目标'hello'的配方失败mpicc:没有这样的文件或目录make:*** [hello]错误1

我检查了YaST并安装了libtool .

1 回答

  • 3

    这个答案来得太晚了 . 我最近遇到了同样的问题 . 因此,任何来这里寻求答案的人,这就是我如何运作的 .

    请注意:这是一个孤立的情况,会收到类似的错误

    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 . 如果你无事可做:

    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路径变量 .

    export PATH=/usr/lib64/mpi/gcc/openmpi/bin:$PATH
    

    这对我有用 . 祝好运!

相关问题