【问题标题】:uname: command not founduname:找不到命令
【发布时间】:2015-01-14 20:22:15
【问题描述】:

我尝试运行一个makefile,我需要设置ifort编译器所在的路径。我尝试以下行:

export PATH=$PATH:/opt/intel/Compiler/11.0/081/bin/intel:/usr/bin

在过去的 makefile 中,类似的东西运行良好。但是现在,我几乎可以肯定我错过了导出行的正确拼写,不想正常工作。

事实上它给了我以下错误信息:

/opt/.../intel64/ifort: uname: command not found

它似乎无法恢复此地址。

我应该更改/opt/../bin/... whit /include/ 或编译器目录中的其他路径吗?

地址的最后一个:/usr/bin 部分是否不正确?

编辑 1

我尝试遵循 cmets 中的建议,在 Makefile 的第二行使用以下行:

export PATH:=$(PATH):/opt/intel/Compiler/11.0/081/bin/intel64:/usr/bin

但我收到以下错误消息:

MyGa.f90:(.text+0x28): undefined reference to "__intel_new_feature_proc_init"

是否有可能我必须将export 命令的行从第二个更改为第一个或:/usr/bin 目录路径?

非常感谢您的帮助。

【问题讨论】:

  • export 行是在 makefile 还是 shell 脚本中?
  • 对于英特尔编译器,您应该获取环境脚本以确保设置了 ifort 期望的所有变量。例如source /opt/intel/bin/ifortvars.sh intel64
  • @EtanReisner and francescalus: 是生成文件的第二行
  • 在生成文件中,该行必须是export PATH=$(PATH):/opt/intel/Compiler/11.0/081/bin/intel:/usr/bin
  • @EtanReisner 是对的,但这里必须使用:= 而不是=,否则会出现递归变量定义错误。

标签: makefile fortran export intel-fortran


【解决方案1】:

垃圾箱中是否存在 uname? 试试这个:

ls -l /bin/uname

检查它是否存在 -rwxr-xr-x 1 root root 35032 Jan 18 2018 /bin/uname(如果存在)

如果存在,请检查您的 PATH 变量

echo $PATH

【讨论】:

  • 如果它不存在怎么办?我得到这个输出 -> ls: /bin/uname: No such file or directory
猜你喜欢
  • 2015-08-28
  • 1970-01-01
  • 2022-01-24
  • 2022-01-23
  • 2021-02-10
  • 1970-01-01
相关资源
最近更新 更多