PHP 在 Ubuntu 14 上安装失败(制作:*** [sapi/cli/php] 错误 1)PHP 5.6.20


PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20

>我正在使用以下配置:

./configure --with-libdir=lib --with-config-file-path=/etc/ --with-config-file-scan-dir=/etc/php5/mods-available --with-pear --enable-cli --enable-intl --with-icu-dir=/opt/icu4c --enable-bcmath --disable-cgi --enable-fpm --with-zlib --with-openssl --with-kerberos --with-bz2 --with-curl --enable-ftp --enable-zip --enable-exif --with-gd --with-jpeg-dir=/usr/lib64 --with-freetype-dir=/usr/lib64 --enable-gd-native-ttf --with-gettext --with-gmp --with-mhash --with-iconv --with-imap --with-mysql --with-imap-ssl --enable-sockets --enable-soap --with-xmlrpc --with-mcrypt --enable-mbstring --enable-embedded-mysqli --with-mysqli=mysqlnd --with-mysql-sock --with-sqlite3 --with-pdo-mysql --with-pdo-mysql=mysqlnd --with-pdo-sqlite --enable-phar --enable-pcntl

并且制作在一段时间后失败,并给出以下错误:

collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

我搜索了一下,大多数文档都讲述了使用清理,这没有帮助,"-lresolve"已经在我的 Makefile 中

以下是错误之前发生的情况:

/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:279: undefined reference to `utext_getNativeIndex_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:280: undefined reference to `utext_clone_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:285: undefined reference to `utext_setNativeIndex_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:286: undefined reference to `utext_getNativeIndex_55'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::setText(UText*, UErrorCode&)':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:128: undefined reference to `utext_clone_55'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::operator==(icu_55::BreakIterator const&) const':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:84: undefined reference to `utext_equals_55'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::CodePointBreakIterator()':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:37: undefined reference to `icu_55::BreakIterator::BreakIterator()'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:40: undefined reference to `utext_openUChars_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:37: undefined reference to `icu_55::BreakIterator::~BreakIterator()'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::operator=(PHP::CodePointBreakIterator const&)':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:58: undefined reference to `utext_clone_55'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::CodePointBreakIterator(PHP::CodePointBreakIterator const&)':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:44: undefined reference to `icu_55::BreakIterator::~BreakIterator()'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::clone() const':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:93: undefined reference to `icu_55::UMemory::operator new(unsigned long)'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:93: undefined reference to `icu_55::UMemory::operator delete(void*)'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::createBufferClone(void*, int&, UErrorCode&)':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:255: undefined reference to `icu_55::UMemory::operator new(unsigned long)'
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:255: undefined reference to `icu_55::UMemory::operator delete(void*)'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::getUText(UText*, UErrorCode&) const':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:109: undefined reference to `utext_clone_55'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::~CodePointBreakIterator()':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:67: undefined reference to `icu_55::BreakIterator::~BreakIterator()'
ext/intl/breakiterator/.libs/codepointiterator_internal.o: In function `PHP::CodePointBreakIterator::~CodePointBreakIterator()':
/tmp/kitchen/cache/php-5.6.20/ext/intl/breakiterator/codepointiterator_internal.cpp:73: undefined reference to `icu_55::UMemory::operator delete(void*)'
ext/intl/breakiterator/.libs/codepointiterator_internal.o:(.data.rel.ro._ZTIN3PHP22CodePointBreakIteratorE[_ZTIN3PHP22CodePointBreakIteratorE]+0x10): undefined reference to `typeinfo for icu_55::BreakIterator'
ext/intl/breakiterator/.libs/codepointiterator_internal.o:(.data.rel.ro._ZTVN3PHP22CodePointBreakIteratorE[_ZTVN3PHP22CodePointBreakIteratorE]+0xa8): undefined reference to `icu_55::BreakIterator::getRuleStatus() const'
ext/intl/breakiterator/.libs/codepointiterator_internal.o:(.data.rel.ro._ZTVN3PHP22CodePointBreakIteratorE[_ZTVN3PHP22CodePointBreakIteratorE]+0xb0): undefined reference to `icu_55::BreakIterator::getRuleStatusVec(int*, int, UErrorCode&)'
ext/intl/idn/.libs/idn.o: In function `php_intl_idn_to':
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:233: undefined reference to `uidna_IDNToASCII_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:235: undefined reference to `uidna_IDNToUnicode_55'
ext/intl/idn/.libs/idn.o: In function `php_intl_idn_to_46':
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:147: undefined reference to `uidna_openUTS46_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:155: undefined reference to `uidna_nameToASCII_UTF8_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:200: undefined reference to `uidna_close_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:158: undefined reference to `uidna_nameToUnicodeUTF8_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/idn/idn.c:163: undefined reference to `uidna_close_55'
ext/intl/spoofchecker/.libs/spoofchecker_class.o: In function `spoofchecker_clone_obj':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_class.c:135: undefined reference to `uspoof_clone_55'
ext/intl/spoofchecker/.libs/spoofchecker_class.o: In function `spoofchecker_object_destroy':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_class.c:195: undefined reference to `uspoof_close_55'
ext/intl/spoofchecker/.libs/spoofchecker_create.o: In function `zim_Spoofchecker___construct':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_create.c:40: undefined reference to `uspoof_open_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_create.c:47: undefined reference to `uspoof_getChecks_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_create.c:48: undefined reference to `uspoof_setChecks_55'
ext/intl/spoofchecker/.libs/spoofchecker_main.o: In function `zim_Spoofchecker_isSuspicious':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:41: undefined reference to `uspoof_checkUTF8_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:44: undefined reference to `u_errorName_55'
ext/intl/spoofchecker/.libs/spoofchecker_main.o: In function `zim_Spoofchecker_areConfusable':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:74: undefined reference to `uspoof_areConfusableUTF8_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:77: undefined reference to `u_errorName_55'
ext/intl/spoofchecker/.libs/spoofchecker_main.o: In function `zim_Spoofchecker_setAllowedLocales':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:104: undefined reference to `uspoof_setAllowedLocales_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:107: undefined reference to `u_errorName_55'
ext/intl/spoofchecker/.libs/spoofchecker_main.o: In function `zim_Spoofchecker_setChecks':
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:127: undefined reference to `uspoof_setChecks_55'
/tmp/kitchen/cache/php-5.6.20/ext/intl/spoofchecker/spoofchecker_main.c:130: undefined reference to `u_errorName_55'
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

任何帮助将不胜感激。编译前安装的软件包列表:

git wget libbz2-dev libgmp-dev re2c libvpx-dev libxslt-dev libtidy-dev libreadline6 libreadline6-dev libfreetype6-dev libcurl4-gnutls-dev libldap2-dev libjpeg-dev libjpeg62-dev libpng-dev libbz2-dev libicu-dev libaspell-dev libgd-dev libgmp3-dev php-mail-mime libmcrypt-dev libc-client2007e-dev openssl libssl-dev libxml2-dev libxpm-dev libhiredis-dev

好的,看起来我在这里遇到了一个错误。

我已经在我的机器上从源代码安装了 ICU,并且确实提到了它的路径:

--with-icu-dir=/opt/icu4c

但是,它仍在拾取导致问题的软件包"libicu-dev"。它应该只从我提到的路径中拾取它,即使有一个包。

尽管如此,卸载了"libicu-dev"软件包,安装就完成了。