今天在下载mysql-server的时候,报错信息:
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
这是因为找不到/sbin,目录下的ldconfig了。
解决:
sudo apt-get download libc-bin
dpkg -x libc-bin*.deb unpackdir/
sudo cp unpackdir/sbin/ldconfig /sbin/
sudo apt-get install --reinstall libc-bin
sudo apt-get -f install 这样就可以了。
本文介绍了一种在安装MySQL过程中遇到的错误及其解决方法。错误主要表现为找不到/sbin目录下的ldconfig文件,通过重新下载并安装libc-bin包成功解决了该问题。
2609

被折叠的 条评论
为什么被折叠?



