Arch-Linux
opt/lampp/bin/httpd:載入共享庫時出錯:libcrypt.so.1:無法打開共享對象文件:沒有這樣的文件或目錄
我使用 Arch Linux (x86_64)
我今天使用以下命令更新了我的儲存庫
Sudo Packman -Syu
但是 xampp 程序不再執行
Stopping all servers... Restarting all servers... Starting MySQL Database... Starting Apache Web Server... Exit code: 8 Stdout: apache config test fails, aborting Stderr: /opt/lampp/bin/httpd: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory Starting ProFTPD... Exit code: 8 Stdout: proftpd config test fails, aborting Stderr: /opt/lampp/sbin/proftpd: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
經過一番檢查,我發現 libcrypt.so.1 文件存在
輸出命令locate
libcrypt.so.1
[ahmadreza@ahmadreza-sys ~]$ locate libcrypt.so.1 /usr/lib/libcrypt.so.1
文件的版本如下:
[root@ahmadreza-sys lib]# file libcrypto.so.1* libcrypto.so.1.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=4c926b672d97886b123e03a008387aecf0786de4, stripped [root@ahmadreza-sys lib]#
輸出命令
sudo ldconfig -v | grep libcrypt
[ahmadreza@ahmadreza-sys ~]$ sudo ldconfig -v | grep libcrypt ldconfig: Path `/usr/lib64' given more than once (from <builtin>:0 and <builtin>:0) ldconfig: Can't stat /usr/libx32: No such file or directory libcrypt.so.2 -> libcrypt.so.2.0.0 libcrypto.so.1.1 -> libcrypto.so.1.1 libcryptsetup.so.12 -> libcryptsetup.so.12.7.0 [ahmadreza@ahmadreza-sys ~]$
出局
file /opt/lampp/bin/httpd
[ahmadreza@ahmadreza-sys ~]$ file /opt/lampp/bin/httpd /opt/lampp/bin/httpd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=00effd3a02918135bf3106612c2b59866e4f92fe, stripped [ahmadreza@ahmadreza-sys ~]$
我該如何解決?
我有同樣的錯誤,通過安裝這個包“libxcrypt-compat”解決了。它不在 pacman 中,通過 AUR 安裝。
yay -S libxcrypt-compat
libxcrypt-compat 不再在 AUR 中,自 2022 年 2 月 24 日起,它已成為一個拆分包。
這是你現在需要的,來自 AUR:
yay -Syu lib32-libxcrypt-compact