我希望有人能在这里帮助我。我花了很长时间才弄清楚,但是......还没有运气。我是 Ubuntu/Linux 的新手。因此,我在某处找到了 phpbrew 的说明并成功安装了它,但我无法安装旧版 php。要安装旧版 php,我使用以下命令:$ phpbrew install 5.3.1 +default 然后出现以下错误。即使我在 Google 上搜索这些错误,我也找不到任何解决方案。有人可以给我一些关于如何安装旧版 php 的提示吗?我有一个针对 php 版本的项目,所以我真的需要在本地机器上安装才能开发一些应用程序。
我收到的错误:
===> Checking patches...
Checking patch for php5.3.29 multi-sapi patch.
Checking patch for php5.3.x on 64bit machine when intl is enabled.
3 changes patched.
Checking patch for openssl dso linking patch
===> Building...
Error: Make failed:
The last 5 lines in the log file:
ext/intl/grapheme/grapheme_string.o:(.rodata+0x8): undefined reference to `grapheme_extract_bytecount_iter'
ext/intl/grapheme/grapheme_string.o:(.rodata+0x10): undefined reference to `grapheme_extract_charcount_iter'
collect2: error: ld returned 1 exit status
Makefile:244: recipe for target 'sapi/cgi/php-cgi' failed
make: *** [sapi/cgi/php-cgi] Error 1
Please checkout the build log file for more details:
tail /home/buntu/.phpbrew/build/php-5.3.1/build.log
===== build.log details below (/home/buntu/.phpbrew/build/php-5.3.1/build.log)
/home/buntu/.phpbrew/build/php-5.3.1/ext/openssl/openssl.c:917: undefined reference to `EVP_md2'
ext/openssl/xp_ssl.o: In function `php_openssl_setup_crypto':
/home/buntu/.phpbrew/build/php-5.3.1/ext/openssl/xp_ssl.c:324: undefined reference to `SSLv2_client_method'
/home/buntu/.phpbrew/build/php-5.3.1/ext/openssl/xp_ssl.c:344: undefined reference to `SSLv2_server_method'
ext/intl/grapheme/grapheme_string.o:(.rodata+0x0): undefined reference to `grapheme_extract_count_iter'
ext/intl/grapheme/grapheme_string.o:(.rodata+0x8): undefined reference to `grapheme_extract_bytecount_iter'
ext/intl/grapheme/grapheme_string.o:(.rodata+0x10): undefined reference to `grapheme_extract_charcount_iter'
collect2: error: ld returned 1 exit status
Makefile:244: recipe for target 'sapi/cgi/php-cgi' failed
make: *** [sapi/cgi/php-cgi] Error 1
答案1
您可以将 PHP 作为 XAMPP 包的一部分进行安装。XAMPP 包含 Apache、PHP、MySQL 和 Perl。XAMPP 1.7.7是最新的 XAMPP,带有 PHP 版本 5.3。
您可以找到更多信息堆栈溢出
答案2
如果你不需要 openssl,只需从构建中省略它
phpbrew install 5.3.1 +default-openssl