在Fedora 16上通过pecl安装stomp失败(找不到OpenSSL的库)

我试图通过pecl在Fedora 16服务器上安装stomp php扩展。 在centos我有类似的问题,但安装openssl-devel后,一切顺利,我安装了跺脚。 在Fedora服务器(openssl,openssl-devel安装)我得到:

pecl install stomp downloading stomp-1.0.4.tgz ... Starting to download stomp-1.0.4.tgz (18,354 bytes) ......done: 18,354 bytes 6 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 OpenSSL install prefix (no to disable SSL support) [/usr] : /usr building in /var/tmp/pear-build-root2Uodkk/stomp-1.0.4 running: /var/tmp/stomp/configure --with-openssl-dir=/usr checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib64/php/modules checking for PHP installed headers prefix... /usr/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 0.13.5 (ok) checking for gawk... gawk checking whether to enable stomp support... yes, shared checking OpenSSL dir for stomp... /usr checking for pkg-config... /usr/bin/pkg-config configure: error: Cannot find OpenSSL's libraries ERROR: `/var/tmp/stomp/configure --with-openssl-dir=/usr' failed 

我首先想到的是openSSL安装前缀是错误的,但相同的前缀在centos上工作得很好?

我已经安装了openssl php扩展。

编辑:一些更多信息:

PHP版本=> 5.3.18

PHP-梨1.9.4

安装PHP模块:gd gettext gmp hash iconv imap json ldap libxml mbstring mcrypt memcache mhash mongo mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar readlinereflection会话shmop SimpleXML soap套接字SPL sqlite3标准整数标记器wddx xapian xml xmlreader xmlwriter xsl zip zlib

也许我忘了一些事情。 不知道该怎么办,因为安装了正确的openssl和openssl-devel。 有任何想法吗?

要正确安装stomp扩展(使用pecl)在openssl不在预期的/ usr但系统范围可以重新启动的系统上,而不是指定一个文件夹来查找库,只需键入“yes”。

ref: https : //bugs.php.net/bug.php? id = 63935

这将强制系统find系统默认值。

如果你使用手动编译,只需写下“–with-openssl”,而不是在它之后加一个“=”

ref: https : //bugs.php.net/bug.php? id = 25703 & edit = 2

在CentOS 6.3和

openssl-1.0.0-25.el6_3.1.x86_64 openssl-devel-1.0.0-25.el6_3.1.x86_64

如果pecl install stomp引发错误,则可能必须在/ usr / lib目录中创build链接:

 checking for pkg-config... /usr/bin/pkg-config configure: error: Cannot find OpenSSL's libraries ERROR: `/var/tmp/stomp/configure --with-openssl-dir=/usr' failed 

傀儡食谱克服

 # Handle pecl install error on x86_64 CentOS 6.3 if $architecture == 'x86_64' { file {'/usr/lib/libssl.so': ensure => link, target => '/usr/lib64/libssl.so', require => Package['openssl', 'openssl-devel'], before => Exec['install_pecl_stomp'], } file {'/usr/lib/libcrypto.so': ensure => link, target => '/usr/lib64/libcrypto.so', require => Package['openssl', 'openssl-devel'], before => Exec['install_pecl_stomp'], } $pecl_lib_dir = 'lib64' } else { $pecl_lib_dir = 'lib' } exec {'install_pecl_stomp': command => 'printf "/usr" | pecl install stomp', creates => "/usr/${pecl_lib_dir}/php/modules/stomp.so", require => Package['php', 'openssl', 'openssl-devel'], }