0

我正在尝试使用以下命令安装 lpsolve:http://jeyroz.tumblr.com/post/605709794/lpsolve-php所以 ,我正在尝试执行命令:

$ phpize
$ ./configure --enable-maintainer-zts --with-phplpsolve[version]=../..
$ make
$ make test

当我执行 phpize 时,它​​说:

configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions

不确定这是否正常。

当我执行./configure --enable-maintainer-zts --with-phplpsolve55=../..时,它说:

WARNING: unrecognized options: --enable-maintainer-zts
and then there is some checking and error.
configure: error: Invalid phplpsolve55 library, make_lp() not found

谁能帮我?

4

1 回答 1

1

该选项和相应的错误消息完全令人困惑,看起来好像您首先需要phplpsolve55 库才能构建phplpsolve55 库。

但这里不是这样。相反,它正在寻找 liblpsolve55.so:

checking lpsolve 5.5
  with-phplpsolve55=Insert path to lp_solve here            Include lpsolve Support... yes, shared
checking for make_lp in -llpsolve55... no
configure: error: Invalid phplpsolve55 library, make_lp() not found

--with-phplpsolve55=../..选项告诉configure在哪里可以找到头文件;它需要liblbsolve55.so在受信任的位置找到 lpsolve 库本身。在 Linux 上是 /lib 或 /usr/lib;在 Mac OSX 上,您可能需要将配置命令更改为:

DYLD_LIBRARY_PATH=../.. ./configure --enable-maintainer-zts --with-phplpsolve55=../..

有关更多信息,请参阅此问题

于 2015-11-25T04:15:05.297 回答