我无法使用 apt-get 做任何事情。作为 root,我运行了“apt-get clean”(快速且安静地完成)。然后运行“apt-get update”- 由于我运行的是旧版本(13.?),因此无法找到存储库并失败。它过去总是会因为这个错误而失败,当我尝试安装或删除软件包时会发生这种情况:
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 386770 files and directories currently installed.)
Removing brscan2 (0.2.5-1) ...
rmdir: failed to remove ‘/usr/local/Brother/sane/GrayCmData/ALL’: No such file or directory
rmdir: failed to remove ‘/usr/local/Brother/sane/GrayCmData/AL’: No such file or directory
rmdir: failed to remove ‘/usr/local/Brother/sane/GrayCmData’: No such file or directory
rmdir: failed to remove ‘/usr/local/Brother/sane/models2’: No such file or directory
rmdir: failed to remove ‘/usr/local/Brother/sane’: No such file or directory
rmdir: failed to remove ‘/usr/local/Brother’: No such file or directory
dpkg: error processing package brscan2 (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
brscan2
E: Sub-process /usr/bin/dpkg returned an error code (1)
我曾尝试手动操作“brscan2”,但无法解决这个问题。
我正在考虑放入 14.04 或 16. lts CD 并尝试升级。我敢打赌这也会失败。那么该怎么办?
提前致谢,
账单
答案1
请详细说明 - 您尝试了哪个命令?
你可以试试:
sudo apt-get -f install
和
sudo dpkg --configure -a
如果允许的话我会使用评论
答案2
解决方案
我使用以下命令重新创建了文件夹:
sudo mkdir -pv /usr/local/Brother/sane/models2
mkdir: created directory '/usr/local/Brother'
mkdir: created directory '/usr/local/Brother/sane'
mkdir: created directory '/usr/local/Brother/sane/models2'`
sudo mkdir -pv /usr/local/Brother/sane/GrayCmData/ALL
mkdir: created directory '/usr/local/Brother/sane/GrayCmData'
mkdir: created directory '/usr/local/Brother/sane/GrayCmData/ALL'`
sudo mkdir -pv /usr/local/Brother/sane/GrayCmData/AL
mkdir: created directory '/usr/local/Brother/sane/GrayCmData/AL'`
然后我就可以干净地删除包了:
sudo dpkg -P brscan2