sh:gnuplot:在Gnuplot + Xcode中找不到命令 [英] sh: gnuplot: command not found in Gnuplot + Xcode

查看:119
本文介绍了sh:gnuplot:在Gnuplot + Xcode中找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个类似的问题要问我,但是答案还不是解决方案,因此,如果我能对此有所帮助,将不胜感激.

There was a similar question to mine however the answers were not quite solutions so if I could get some help with this it would be greatly appreciated.

问题在于,当我编译时,Xcode给出了上述的sh:gnuplot:命令找不到的错误.

The problem is that when I compile, Xcode gives the aforementioned error of sh: gnuplot: command not found.

我在终端中检查了which gnuplot,并且正如Macports所期望的那样,它在/opt/local/bin/gnuplot中.此外,printf("PATH=%s\n", getenv("PATH"));显示了我怀疑其中存在问题的路径PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin,但我不确定如何解决此问题.

I checked which gnuplot in terminal and as expected from macports it is in /opt/local/bin/gnuplot. Also printf("PATH=%s\n", getenv("PATH")); shows the path PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin I suspect therein lies the problem but I am not sure how to fix it.

提前谢谢!

推荐答案

在脚本中用/opt/local/bin/gnuplot替换gnuplot的出现,以使$PATH脱离等式.

Replace occurrences of gnuplot, in your script, with /opt/local/bin/gnuplot to take $PATH out of the equation.

这篇关于sh:gnuplot:在Gnuplot + Xcode中找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆