当我sudo apt-get upgrade
在Debian Squeeze安装上运行时,出现以下错误:
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libxml2-dev : Depends: libxml2 (= 2.7.8.dfsg-2+squeeze3) but 2.7.8.dfsg-2+squeeze5 is installed
E: Unmet dependencies. Try using -f.
我不确定“ squeeze3”和“ squeeze5”是什么意思,但这是libxml2软件包中唯一不同的地方。
当我尝试“ sudo apt-get install -f”时,我得到:
The following extra packages will be installed:
libxml2-dev
The following packages will be upgraded:
libxml2-dev
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
108 not fully installed or removed.
Need to get 0 B/830 kB of archives.
After this operation, 69.6 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 96842 files and directories currently installed.)
Preparing to replace libxml2-dev 2.7.8.dfsg-2+squeeze3 (using .../libxml2-dev_2.7.8.dfsg-2+squeeze5_amd64.deb) ...
Unpacking replacement libxml2-dev ...
dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-2+squeeze5_amd64.deb (--unpack):
unable to install new version of `./usr/include/libxml2': No such file or directory
configured to not write apport reports
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-2+squeeze5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
出现类似的错误sudo apt-get upgrade -f
。
我的/etc/apt/sources.list当前是:
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
我该如何解决这个问题?谢谢!
@Gilles啊,权限被弄乱了:
—
乔纳森(Jonathan)
ls -l
说它无法访问libxml2
(甚至以root身份访问),并且?
在所有权限信息的位置标记了标记。促进回答?不知道如何解决,但是我可以调查/与房东交谈。
squeeze3
是挤压的第三个补丁版本,squeeze5
是第五个。它们是版本号的一部分。库和开发文件的版本必须完全匹配。APT要您跑步是正常的apt-get install -f
。不正常的是升级libxml2-dev
失败。目录是否/usr/include/libxml2
存在?权限合理吗?是否有足够的磁盘空间?