2016-04-18 11 views
0

Ich verwende CENTOS 6.7 und Apache und PHP 5.4.x. Ich benutze die EPEL- und REMI-Repositories. Ich versuche die libsodium Erweiterung zu installieren.Probleme bei der Installation von libsodium auf Centos 6

Es ist mein Verständnis, dass ich zuerst libsodium installieren muss, dann die Erweiterung. Basierend auf googeln, um die richtige Version zu bekommen, ich landete auf:

yum --enablerepo=remi install php54-php-pecl-libsodium 

und ich bekomme folgendes Ergebnis:

Installed: 
    php54-php-pecl-libsodium.x86_64 0:1.0.5-1.el6.remi 

Dependency Installed: 
    audit-libs-python.x86_64 0:2.3.7-5.el6 
    environment-modules.x86_64 0:3.2.10-2.el6 
    libcgroup.x86_64 0:0.40.rc1-17.el6_7 
    libselinux-python.x86_64 0:2.0.94-5.8.el6 
    libsemanage-python.x86_64 0:2.0.43-5.1.el6 
    php54-php-common.x86_64 0:5.4.45-7.el6.remi 
    php54-runtime.x86_64 0:2.1-4.el6.remi 
    policycoreutils-python.x86_64 0:2.0.83-24.el6 
    setools-libs.x86_64 0:3.3.7-4.el6 
    setools-libs-python.x86_64 0:3.3.7-4.el6 
    tcl.x86_64 1:8.5.7-6.el6 

Dann tippe ich in:

pecl install libsodium 

und ich :

[[email protected] tmp]# pecl install libsodium 
downloading libsodium-1.0.5.tgz ... 
Starting to download libsodium-1.0.5.tgz (169,801 bytes) 
.....................................done: 169,801 bytes 
9 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20100412 
Zend Module Api No:  20100525 
Zend Extension Api No: 220100525 
building in /var/tmp/pear-build-rootAHK93D/libsodium-1.0.5 
running: /var/tmp/libsodium/configure --with-php-config=/usr/bin/php-config 
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 for C compiler default output file name... a.out 
checking whether the C compiler works... yes 
checking whether we are cross compiling... no 
checking for suffix of executables... 
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 for libsodium support... yes, shared 
checking for libsodium files in default path... not found 
configure: error: Please install libsodium - See https://github.com/jedisct1/libsodium 
ERROR: `/var/tmp/libsodium/configure --with-php-config=/usr/bin/php-config' failed 

Sie können den Fehler scheint t o zeigen an, dass libdodium nicht installiert ist, wenn es ist. Vermisse ich einen Schritt?

+0

Haben Sie zum ersten Mal 'yum install libsodium-devel' gemacht? – drew010

Antwort

3

php54-php-pecl-libsodium ist ein SCL-Paket (für die parallele Installation).

Sie benötigen wahrscheinlich php-pecl-libsodium.

yum --enablerepo=remi install php-pecl-libdosium 

Sie müssen den "pecl install command" nicht ausführen.

+0

Das hat den Trick gemacht! Ich musste auch die pecl-Installation nicht ausführen. Vielen Dank! –

+0

yum --enablerepo = remi installieren php-pecl-libsodium – DrupalDrop

0

Es ist eine Weile her, seit ich ein PECL-Modul installiert habe, aber ich glaube, dass das Ausführen des ersten Befehls die Installation des Moduls übernommen hat, danach muss pecl nicht mehr manuell ausgeführt werden.

In der Tat können wir sehen, dass die Dateiliste von rpm zeigt das Modul zusammen mit einer php.ini Datei installiert, um es aufzunehmen.

$ rpm -qlp http://rpms.famillecollet.com/store/php54/php/pecl/libsodium/1.0.5/php54-php-pecl-libsodium-1.0.5-1.el6.remi.x86_64.rpm 
/opt/remi/php54/root/etc/php.d/libsodium.ini 
/opt/remi/php54/root/usr/lib64/php/modules/libsodium.so 
/opt/remi/php54/root/usr/share/doc/pecl/libsodium 
/opt/remi/php54/root/usr/share/doc/pecl/libsodium/LICENSE 
/opt/remi/php54/root/usr/share/doc/pecl/libsodium/README.md 
/opt/remi/php54/root/var/lib/pear/pkgxml/php54-php-pecl-libsodium.xml 

Haben Sie sichergestellt, dass Sie Ihren Webserver neu starten?