ホームページ > バックエンド開発 > PHPチュートリアル > macosx-10.11 - 更新osx 10.11后,删除自带php版本,重新编译php 5.5.29,到make阶段提示错误。

macosx-10.11 - 更新osx 10.11后,删除自带php版本,重新编译php 5.5.29,到make阶段提示错误。

WBOY
リリース: 2016-06-06 20:22:10
オリジナル
1566 人が閲覧しました

配置命令:
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/private/etc --with-apxs2=/usr/sbin/apxs --enable-cli --with-config-file-path=/etc --with-config-file-scan-dir=/Library/Server/Web/Config/php --with-libxml-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr --with-zlib-dir=/usr/lib --enable-bcmath --with-bz2 --enable-calendar --disable-cgi --with-curl=/usr/local/curl --enable-exif --enable-fpm --enable-ftp --with-png-dir --with-gd --with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-95~11/Root/usr/local --enable-gd-native-ttf --with-icu-dir=/usr --enable-mbstring --enable-mbregex --with-mysql=mysqlnd --with-mysqli=mysqlnd --without-pear --with-pear=no --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/mysql/mysql.sock --enable-shmop --with-snmp=/usr --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-xmlrpc --with-iconv=/usr/lib --with-xsl=/usr --enable-zip --with-freetype-dir=/usr/local/lib

配置完成的提示:
Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands

make 编译时提示的错误:
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:

<code>  _do_convert in gdkanji.o
  _zif_iconv_substr in iconv.o
  _zif_iconv_mime_encode in iconv.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_appendl in iconv.o
  ...</code>
ログイン後にコピー
ログイン後にコピー

"_libiconv_close", referenced from:

<code>  _do_convert in gdkanji.o
  _zif_iconv_substr in iconv.o
  _zif_iconv_mime_encode in iconv.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_mime_decode in iconv.o
  ...</code>
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー

"_libiconv_open", referenced from:

<code>  _do_convert in gdkanji.o
  _zif_iconv_substr in iconv.o
  _zif_iconv_mime_encode in iconv.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_mime_decode in iconv.o
  ...</code>
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: * [libs/libphp5.bundle] Error 1

回复内容:

配置命令:
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/private/etc --with-apxs2=/usr/sbin/apxs --enable-cli --with-config-file-path=/etc --with-config-file-scan-dir=/Library/Server/Web/Config/php --with-libxml-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr --with-zlib-dir=/usr/lib --enable-bcmath --with-bz2 --enable-calendar --disable-cgi --with-curl=/usr/local/curl --enable-exif --enable-fpm --enable-ftp --with-png-dir --with-gd --with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-95~11/Root/usr/local --enable-gd-native-ttf --with-icu-dir=/usr --enable-mbstring --enable-mbregex --with-mysql=mysqlnd --with-mysqli=mysqlnd --without-pear --with-pear=no --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/mysql/mysql.sock --enable-shmop --with-snmp=/usr --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-xmlrpc --with-iconv=/usr/lib --with-xsl=/usr --enable-zip --with-freetype-dir=/usr/local/lib

配置完成的提示:
Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands

make 编译时提示的错误:
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:

<code>  _do_convert in gdkanji.o
  _zif_iconv_substr in iconv.o
  _zif_iconv_mime_encode in iconv.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_appendl in iconv.o
  ...</code>
ログイン後にコピー
ログイン後にコピー

"_libiconv_close", referenced from:

<code>  _do_convert in gdkanji.o
  _zif_iconv_substr in iconv.o
  _zif_iconv_mime_encode in iconv.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_mime_decode in iconv.o
  ...</code>
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー

"_libiconv_open", referenced from:

<code>  _do_convert in gdkanji.o
  _zif_iconv_substr in iconv.o
  _zif_iconv_mime_encode in iconv.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_mime_decode in iconv.o
  ...</code>
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー
ログイン後にコピー

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: * [libs/libphp5.bundle] Error 1

iconv不要重新编译,用系统自带的,新版和旧版头文件不一样,会报错!

你有用homebrew么?还是有特殊的原因需要自己编译?不然感觉还是用homebrew在Mac下来管理开发的依赖好一点:)

関連ラベル:
php
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート