当前位置: 首页 > 知识库问答 >
问题:

PHPBrew-安装的各种问题

宗政才俊
2023-03-14

我正在尝试使用PHPBrew安装PHP5.4,但出现以下错误:

-> % phpbrew install 5.4.6 +default +apxs2 +mysql                              
===> phpbrew will now build 5.4.6
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: c9aa0f4996d1b91ee9e45afcfaeb5d2e
===> Distribution file was successfully extracted, skipping...
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/home/breq/.phpbrew/build/php-5.4.6' --quiet 'clean'
===> Checking patches...
Checking patch for replace apache php module name with custom version name
0 changes patched.
Found existing build.log, renaming it to /home/breq/.phpbrew/build/php-5.4.6/build.log.1466515643
===> Configuring 5.4.6...


Use tail command to see what's going on:
   $ tail -F /home/breq/.phpbrew/build/php-5.4.6/build.log


===> Checking patches...
Checking patch for php5.3.29 multi-sapi patch.
Checking patch for php5.3.x on 64bit machine when intl is enabled.
Checking patch for openssl dso linking patch
===> Building...
Error: Make failed:
The last 5 lines in the log file:
/home/breq/.phpbrew/build/php-5.4.6/ext/openssl/xp_ssl.c:355: undefined reference to `SSLv3_server_method'

/home/breq/.phpbrew/build/php-5.4.6/ext/openssl/xp_ssl.c:343: undefined reference to `SSLv3_client_method'

collect2: error: ld returned 1 exit status

Makefile:244: recipe for target 'sapi/cli/php' failed

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

Please checkout the build log file for more details:
     tail /home/breq/.phpbrew/build/php-5.4.6/build.log

openssl

-> % phpbrew install 5.4.6 +default +apxs2 +mysql +openssl=/usr/include/openssl
===> phpbrew will now build 5.4.6
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: c9aa0f4996d1b91ee9e45afcfaeb5d2e
===> Distribution file was successfully extracted, skipping...
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/home/breq/.phpbrew/build/php-5.4.6' --quiet 'clean'
===> Checking patches...
Checking patch for replace apache php module name with custom version name
0 changes patched.
Found existing build.log, renaming it to /home/breq/.phpbrew/build/php-5.4.6/build.log.1466516015
===> Configuring 5.4.6...


Use tail command to see what's going on:
   $ tail -F /home/breq/.phpbrew/build/php-5.4.6/build.log


Error: Configure failed:
The last 5 lines in the log file:
checking for Kerberos support... no

checking for DSA_get_default_method in -lssl... no

checking for X509_free in -lcrypto... yes

checking for pkg-config... /usr/bin/pkg-config

configure: error: Cannot find OpenSSL's <evp.h>

Please checkout the build log file for more details:
     tail /home/breq/.phpbrew/build/php-5.4.6/build.log

我的操作系统xubuntu16.10PHP7.07

-> % tail /home/lmalicki/.phpbrew/build/php-5.4.6/build.log
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>

共有3个答案

宓昂雄
2023-03-14
configure: error: Cannot find OpenSSL's <evp.h>

如果安装了更新版本的OpenSSL,然后提供了发行版,则可能会发生此问题。

如果你使用ubuntu,你可能需要降级你的软件包。(但可能您安装了不同的版本是有原因的,所以在这里要小心)

#file etc/apt/preferences.d/allow-downgrade

Package: *
Pin: release o=Ubuntu
Pin-Priority: 1001

然后

sudo apt-get update 
sudo apt-get upgrade

和选择

 -- --with-openssl=/path/to/libs 

+openssl

应该很好用。

如果您已经从PHPbrew安装了一些无法正常工作的PHP,请不要忘记使用

phpbrew switch recently_installed_php_ver_number_here
唐阳飙
2023-03-14

我看你缺少了一些依赖项。

首先尝试安装ssl开发包:

apt-get install libssl-dev

PHPBrew只是下载和编译PHP,但它不会在你的操作系统中安装所需的依赖项。

编辑:

我刚刚注意到您在openssl=/usr/include/openssl中提供了openssl库的路径。

你确定它在那儿吗?您可以使用哪个openssl检查它。此命令将返回openssl二进制文件的路径。

您也可以尝试简单地删除路径,因为PHPBrew应该自己找到合适的二进制文件。

陶福
2023-03-14

由于openssl指令实际上提供的是前缀而不是包含路径,请尝试

+openssl=/usr -- --with-libdir=lib64
 类似资料:
  • 本文向大家介绍mysql安装时出现各种常见问题的解决方法,包括了mysql安装时出现各种常见问题的解决方法的使用技巧和注意事项,需要的朋友参考一下 小编为大家整理许多mysql安装时出现各种常见问题的解决方法,供大家参考,具体内容如下 问题一: 当各位在安装、重装时出现could not start the service mysql error:0 原因: 卸载mysql时并没有完全删除相关文件

  • 我似乎在绕圈子,试图用phpbrew安装一个PHP版本。当尝试安装任何版本的php时,它会返回一个致命错误: 找不到openssl扩展名,要下载版本文件,您需要openssl。 但是当我尝试通过phpbrew安装openssl时,它也会抛出一个错误: 错误:未定义PHPBREW_PHP环境变量。此扩展命令要求您从生成列表中指定PHP版本。 任何帮助都将不胜感激。 phpbrew--debug安装p

  • 本文向大家介绍详解Python安装tesserocr遇到的各种问题及解决办法,包括了详解Python安装tesserocr遇到的各种问题及解决办法的使用技巧和注意事项,需要的朋友参考一下 Tesseract的安装及配置 在Python爬虫过程中,难免遇到各种各样的验证码问题,最简单的就是​这种验证码了,那么在遇到验证码的时候该怎么办呢?我们就需要OCR技术了,OCR-即Optical Charac

  • 问题内容: 我在Mac OSX 10.6机器上安装了各种版本的python,其中一些安装了macports: 默认或系统版本为。我现在使用的是python27 我最近尝试使用安装django ,但已使用默认的python进行安装(我可以通过python_selecting python26-apple并导入django进行检查)。相反,如果我下载Django tarball,请展开并使用 一切都按

  • 我试图安装gmagick PHP扩展在一个常规的PHPBrew的方式与:. 但它一直失败,即使gmagick本身已经安装在我的系统中:。 然后我发现PHPBrew能够安装软件的beta版本,所以下一个命令是:。 它几乎成功了。。。但最后一个错误是系统中缺少“GraphicsMagic配置”。但事实并非如此!当我运行时,位置是正确的(在brew Cell dir下的某个地方)。 那么,如何将ext安

  • 问题内容: 我知道我可以使用Java安装Jython,并且可以在使用Python的地方使用Jython。Jython外壳运行良好。 在Jython中,我该如何安装类似的库而该库通常是通过或安装的 问题答案: 某些Python模块(如)在C中具有必需的组件。它们在Jython中不起作用。 大多数Python软件包都可以正常运行,你可以使用与CPython相同的工具来安装它们。在Jython Book