데비안 9.4에 PHP 7.0을 설치하려고 합니다. 설치하면 libapache2-mod-php7.0
다음과 같은 오류가 발생합니다.
Syntax error on line 141 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.0.load: Cannot load /usr/lib/apache2/modules/libphp7.0.so into server: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by /usr/lib/apache2/modules/libphp7.0.so)
ldd를 실행 libphp7.0.so
하면
linux-vdso.so.1 (0x00007ffce37eb000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fbb967b7000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fbb965a0000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbb96386000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fbb96113000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbb95f0b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbb95c07000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbb95a03000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007fbb957eb000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fbb95430000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fbb951c4000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fbb94dc8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbb94a29000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbb9480c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbb97026000)
libicui18n.so.57 => /usr/lib/x86_64-linux-gnu/libicui18n.so.57 (0x00007fbb94392000)
libicuuc.so.57 => /usr/lib/x86_64-linux-gnu/libicuuc.so.57 (0x00007fbb93fea000)
libicudata.so.57 => /usr/lib/x86_64-linux-gnu/libicudata.so.57 (0x00007fbb9256d000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fbb92347000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbb91fc5000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbb91dae000)
내가 달리면 ls -l /usr/lib/x86_64-linux-gnu/ | grep crypto
나는 얻는다.
-rw-r--r-- 1 root root 4811326 Mar 29 06:51 libcrypto.a
-rw-r--r-- 1 root root 11735850 Jun 5 2017 libcrypto++.a
lrwxrwxrwx 1 root root 13 Jun 5 2017 libcryptopp.a -> libcrypto++.a
lrwxrwxrwx 1 root root 14 Jun 5 2017 libcryptopp.so ->libcrypto++.so
lrwxrwxrwx 1 root root 16 Jun 5 2017 libcryptopp.so.6 -> libcrypto++.so.6
lrwxrwxrwx 1 root root 16 Mar 29 06:51 libcrypto.so ->libcrypto.so.1.1
lrwxrwxrwx 1 root root 20 Jun 5 2017 libcrypto++.so ->libcrypto++.so.6.0.0
lrwxrwxrwx 1 root root 16 Apr 14 16:09 libcrypto.so.1.0.0 ->libcrypto.so.1.1
-rw-r--r-- 1 root root 2492224 Mar 29 07:10 libcrypto.so.1.0.2
-rw-r--r-- 1 root root 2066816 Apr 14 15:48 libcrypto.so.1.1
lrwxrwxrwx 1 root root 20 Jun 5 2017 libcrypto++.so.6 ->libcrypto++.so.6.0.0
-rw-r--r-- 1 root root 3667096 Jun 5 2017 libcrypto++.so.6.0.0
lrwxrwxrwx 1 root root 18 Aug 9 2017 libk5crypto.so.3 ->libk5crypto.so.3.1
-rw-r--r-- 1 root root 203656 Aug 9 2017 libk5crypto.so.3.1
올바른 방향을 잡는 데 도움이 되는 추가 정보를 제공할 수 있습니다. 나는 여기서 헤매고 있습니다. 올바른 libcrypto 버전이 있는 것 같지만 PHP는 이를 지원하지 않습니다.
답변1
다소 긴 오류 메시지를 살펴보십시오.
Syntax error on line 141 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.0.load: Cannot load /usr/lib/apache2/modules/libphp7.0.so into server: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by /usr/lib/apache2/modules/libphp7.0.so)
근본 원인을 쉽게 찾을 수 있습니다.
OPENSSL_1_1_0 not found (required...)
즉, 설치된 패키지 버전이 없거나 openssl
오래된 것입니다.
다음 명령을 실행하여 이를 확인할 수 있습니다.
apt-cache policy openssl
제 경우에는 설치되어 있고 최신 버전이 표시됩니다.
openssl:
Installed: 1.1.0f-3+deb9u2
Candidate: 1.1.0f-3+deb9u2
Version table:
*** 1.1.0f-3+deb9u2 500
500 http://security.debian.org stretch/updates/main amd64 Packages
100 /var/lib/dpkg/status
1.1.0f-3+deb9u1 500
500 http://deb.debian.org/debian stretch/main amd64 Packages