标签归档:apt

Fix E: Could not get lock /var/cache/apt/archives/lock

Problem:

The other day a reader asked me that she had troubles with this kind of error:

E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

She was trying to follow one of the tips mentioned in things to do to after installing Ubuntu 14.04 when she encountered this error. Its one of the common occurring update errors in Ubuntu and also one of the least annoying ones.

继续阅读

怎样重新配置apt安装的程序

偶尔我会遇到通过apt-get安装完成后配置失败的情况,想重新配置但不知道从哪里入手,其实使用这条命令:sudo dpkg-reconfigure xxx 即可。

或者遇到类似这种问题:

dpkg: 处理软件包 xxx (–configure)时出错

那可以尝试这样解决:

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info~
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo apt-get -f install
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info~
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info~ /var/lib/dpkg/info