Raspberry Pi Libc损坏
问题描述:
我的Raspberry Pi不会再安装任何东西,因为它一直在抱怨半装libc6。例如,当我尝试安装G ++ 4.7:Raspberry Pi Libc损坏
[email protected] ~/workspace $ sudo apt-get install g++-4.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
g++-4.7 : Depends: libstdc++6-4.7-dev (= 4.7.2-5+rpi1) but it is not going to be installed
libkrb5-3 : Depends: libc6 (>= 2.16) but 2.13-38+rpi2+deb7u3 is to be installed
locales : Depends: glibc-2.19-1 but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
所以,后来我跑sudo apt-get install -f
,它给我这个错误:
dpkg: error processing libc6:armhf (--configure):
package libc6:armhf is not ready for configuration
cannot configure (current status `half-installed')
Errors were encountered while processing:
libc6:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)
我能做些什么呢?
答
看起来你添加错库到你的/etc/apt/sources.list或/etc/apt/sources.list.d/*, 看看
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
应该没有debian的回购协议在源列表,同时检查raspbian版本,看起来像你的“喘息”,因此将其删除“SID”或“杰西”,当你解决它,不要
sudo apt-get update
sudo apt-get -f install
如果您的sources.list是正确的,你应该学会不从随机站点安装debs。
我们解决您的libc6,重新安装
wget https://archive.raspbian.org/raspbian/pool/main/e/eglibc/libc6-dev_2.13-38%2brpi2%2bdeb7u3_armhf.deb
sudo dpkg -i --force-all libc6-dev_2.13-38+rpi2+deb7u3_armhf.deb
sudo apt-get -f install
如果是给你很难修复了sources.list或没有帮助,请提供以下命令的输出
apt-cache policy libc6
apt-cache policy libc6-dev
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
答
这对我来说很好,从2015年的形象
wget https://archive.raspbian.org/raspbian/pool/main/e/eglibc/libc6-dev_2.13-38%2brpi2%2bdeb7u3_armhf.deb
sudo dpkg -i --force-all libc6-dev_2.13-38+rpi2+deb7u3_armhf.deb
sudo apt-get -f install