我正在尝试在 Debian 3.2 上安装 Odoo,但在安装其依赖项时遇到了困难。
当我尝试安装时python-decorator
,出现此错误:
The python-decorator package is not available, but some other package references
him. This may mean that the package is missing, has been obsoleted, or is only
is available from another source
E: The package "python-decorator 'has no installation candidate
这是我的 sources.list:
deb cdrom:[Debian GNU/Linux 7.8.0 _Wheezy_ - Official amd64 DVD Binary-1 20150110-14:43]/ wheezy contrib main
deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib
答案1
确保已配置外部资源。您可以通过查看 /etc/apt/sources.list 以及可能位于 /etc/apt/sources.list.d 中的文件来检查这一点。允许您从互联网档案安装软件包的最小 /etc/apt/sources.list 是:
deb http://http.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb http://http.debian.org/debian/ wheezy-updates main
然后运行“sudo apt-get update”,您就可以“sudo apt-get install python-decorator”。
答案2
我修复了它。问题出在 sources.list 上,它只在 Debian DVD 中查找,而不是在官方互联网存储库中查找。
使用http://debgen.simplylinux.ch/我生成了一个新的 sources.list,然后apt-get update
让它工作。这是我正在使用的 sources.list:
deb http://ftp.es.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free