ubuntu - 他尝试更新 ubuntu 13.10 时出错
问题描述
我想更新我的 ubuntu 服务器版本
我执行了命令sudo apt-get update
,一切似乎都很顺利,但是当我运行sudo apt-get upgrade
这个错误时,有人可以帮助我吗?
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = "en_US.UTF-8",
LC_TYPE = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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.
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)
解决方案
从错误中,ldconfig
也许已经从 移动libc6
到libc-bin
。使用以下命令下载并解压libc-bin
包:
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 install -f
来自修复的答案:无法执行“区域设置”:/usr/share/perl5/Debconf/Encoding.pm 没有这样的文件或目录
推荐阅读
- python-3.x - 有没有办法在 python 中使用带有 subprocess.call() 的 shell 脚本
- ios - 执行 expo build:ios 时 Apple Developer Portal 中的身份验证失败
- python - 为什么我的 Flask 应用程序只能从其他计算机访问?
- python - 为什么这些类属性不会成倍增加?
- java - 如何根据Java文本文件中的子字符串更改值
- embedded - CAN的RX Fifo1没有产生中断回调(基本上它没有接收数据)
- swift - SwiftUI 搜索栏
- java - 如何使用 Collectors.summarizingInt 和 flatMap 运算符汇总歌曲的投票
- json - JSON Schema oneof 不需要
- ios - 无法在没有 iOS 的情况下上传 WatchApp 构建