Home> php教程> php手册> body text

make: *** [sapi/cli/php] Error 1 解决办法

WBOY
Release: 2016-06-13 10:43:25
Original
1475 people have browsed it

重新编译安装php的make时候出现

make: *** [sapi/cli/php] Error 1

一:考虑过make clean,问题依然

二:(采取此方法后出现启动apache报错:/usr/local/apache2/modules/libphp5.so: undefined symbol: libiconv_open),采取第三种方法无问题

在「./configure 」沒抓好一些环境变数值。错误发生点在建立「-o sapi/cli/php」是出错,没給到要link 的iconv 函式库参数。 解决方法:编辑Makefile 我的php5.2.5在88行的地方:

EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient_r -lgd -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2

-lz -lm -lmysqlclient_r -lz -lcrypt -lnsl -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -l

crypt

在最后加上-liconv,

EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient_r -lgd -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2

-lz -lm -lmysqlclient_r -lz -lcrypt -lnsl -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -l

crypt -liconv

然后重新再次make 即可。

三:(推荐)

另一种办法

make ZEND_EXTRA_LIBS='-liconv'

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!