【问题标题】:Error installing libxml2-dev on Ubuntu 9.10 - for lxml-etree在 Ubuntu 9.10 上安装 libxml2-dev 时出错 - 对于 lxml-etree
【发布时间】:2012-12-24 17:42:17
【问题描述】:

尝试在 Ubuntu 9.10
I learned here 上安装 lxml-etree 我需要 libxml2-dev & >libxslt-dev

当我尝试安装 libxml2-dev 时,运行 apt-get install libxml2-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libxml2
The following NEW packages will be installed:
  libxml2-dev
The following packages will be upgraded:
  libxml2
1 upgraded, 1 newly installed, 0 to remove and 73 not upgraded.
Need to get 1696kB of archives.
After this operation, 2830kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://archive.ubuntu.com karmic-updates/main libxml2 2.7.5.dfsg-1ubuntu1.2
  404  Not Found [IP: 91.189.92.200 80]
Err http://security.ubuntu.com karmic-security/main libxml2 2.7.5.dfsg-1ubuntu1.2
  404  Not Found
Err http://security.ubuntu.com karmic-security/main libxml2-dev 2.7.5.dfsg-1ubuntu1.2
  404  Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.7.5.dfsg-1ubuntu1.2_amd64.deb  404  Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2-dev_2.7.5.dfsg-1ubuntu1.2_amd64.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

此版本的 lxml 是否已删除?
无法获取 http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.7.5.dfsg-1ubuntu1.2_amd64.deb 404 Not Found

因此,我尝试按照该线程中建议的方式运行 apt-get install python-lxml
但这给了我这个:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python-lxml-dbg
The following NEW packages will be installed:
  python-lxml
0 upgraded, 1 newly installed, 0 to remove and 74 not upgraded.
Need to get 1265kB of archives.
After this operation, 4002kB of additional disk space will be used.
Err http://archive.ubuntu.com karmic/main python-lxml 2.1.5-1ubuntu2
  404  Not Found [IP: 91.189.92.202 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/lxml/python-lxml_2.1.5-1ubuntu2_amd64.deb  404  Not Found [IP: 91.189.92.202 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

【问题讨论】:

  • 你有没有运行apr-get update然后再试一次?
  • 只是“apt-get update”?还是在那之后?例如"apt-get 更新 python-lxml"
  • 尝试apt-get update(更新您的本地仓库——无论如何都不会受到伤害),然后apt-get install python-lxml 看看会发生什么
  • 做了一个“apt-get update”,但这给了我一些错误,在这一行 --> W: Failed to fetch archive.ubuntu.com/ubuntu/dists/karmic/main/binary-amd64/… 404 Not Found [IP: 91.189.92.200 80 ]
  • 也许可以在 askubuntu.com 上询问,因为我认为它更多地归结为系统相关的包管理,而不是编程和 Python 相关(缺少有人有时间指导您下载和编译源代码)跨度>

标签: python installation lxml ubuntu-9.10 xml.etree


【解决方案1】:

Ubuntu 9.10 不再受支持,因此无法正常工作。 创建了一个新的 12.04 主机。

【讨论】: