在Mac OS 10.8上安装Gnuplot 4.6.3。

我正在尝试在我的新Macbook Pro上安装gnuplot 4.6.3,运行OS 10.8.3。

我安装了Xcode 4.6.2,并且能够编译一些程序,所以我认为它没问题。在Mac上也有一个关于readlines的问题,我按照这里的步骤来解决:http://bhou.wordpress.com/2011/09/13/how-to-install-gnuplot-in-mac-os-x-lion/

但是,我仍然无法安装gnuplot。当我进入gnuplot目录并键入

./configure --with-read-line=/Path_to_readline/readline-6.2

我收到以下警告:

Could not find support for lua using pkg-config.

我去安装了LUA,我可以从终端提示符中无论在哪个目录下调用它(即它在我的路径中),所以我认为LUA在那里,但出于某种原因它没被识别。./config输出的相关行说:

checking for LUA... no
checking for LUA... no
configure: WARNING: Could not find support for lua using pkg-config.
checking for library containing luaL_openlibs... -llua
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes

由于我想不到其他要尝试的事情,所以我继续尝试:

make

我得到以下错误:

Undefined symbols for architecture i386:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [gnuplot] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

我认为这是一个单独的问题,但我也不知道如何处理。任何建议将不胜感激!

点赞