由于缺少 python-dateutil、python-rsvg 和 imagemagick 包,无法安装 openastro.org 包

由于缺少 python-dateutil、python-rsvg 和 imagemagick 包,无法安装 openastro.org 包

在我的个人电脑上安装 openastro 时遇到了问题。

$ sudo apt-get install openastro.org 
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openastro.org : Depends: python-dateutil but it is not installable
                 Depends: python-rsvg but it is not installable
                 Depends: imagemagick but it is not installable
E: Unable to correct problems, you have held broken packages.

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

uname -a

Linux user-Lenovo-B580 3.13.0-67-generic #110-Ubuntu SMP Fri Oct 23 13:24:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

apt-cache policy openastro.org python-dateutil python-rsvg imagemagick

openastro.org:
  Installed: (none)
  Candidate: 1.1.48-0ubuntu1~trusty
  Version table:
     1.1.48-0ubuntu1~trusty 0
        500 http://ppa.launchpad.net/pellesimon/ppa/ubuntu/ trusty/main amd64 Packages
python-dateutil:
  Installed: (none)
  Candidate: (none)
  Version table:
python-rsvg:
  Installed: (none)
  Candidate: (none)
  Version table:
imagemagick:
  Installed: (none)
  Candidate: (none)
  Version table:

做过

sudo add-apt-repository ppa:pellesimon/ppa
sudo apt-get update
sudo apt-get install openastro.org 

仍然没有解决方案

$ sudo apt-get install openastro.org 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openastro.org : Depends: python-dateutil but it is not installable
                 Depends: python-rsvg but it is not installable
                 Depends: imagemagick but it is not installable
E: Unable to correct problems, you have held broken packages.

答案1

输出apt-cache policy python-dateutil python-rsvg imagemagick如下

python-dateutil:
  Installed: (none)
  Candidate: (none)
  Version table:
python-rsvg:
  Installed: (none)
  Candidate: (none)
  Version table:
imagemagick:
  Installed: (none)
  Candidate: (none)
  Version table:
  • 这意味着该main存储库未启用或您从未运行过sudo apt-get update

或者

  • 期间出现一条错误消息apt-get update(您稍后提供):

    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'universe/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    

    你确实获取信息

    Index of /ubuntu/dists/wily/universe/binary-amd64
    [ICO]   Name            Last modified       Size
    [DIR]   Parent Directory        -
    [ ]     Packages.bz2    22-Oct-2015 12:48   6.4M
    [ ]     Packages.gz     22-Oct-2015 12:48   8.3M
    [ ]     Release         22-Oct-2015 12:48   98
    

    没有Packages文件。但是 APT 文档说:

    然后,APT 将导入每个 […意味着 …] 源发布的软件包列表sources.list。此操作通过下载 Packages.xz 或使用不同压缩方法(例如 Packages.gz 或 .bz2)的变体文件(对于二进制软件包源)来实现

    来源

其他奇怪的事情是,只有宇宙存储库和有时多元宇宙存储库有问题,而且有时会出现“哈希总和不匹配”错误。


您可以手动安装软件包

mkdir ~/openastro
cd ~/openastro
wget http://mirrors.kernel.org/ubuntu/pool/main/p/python-dateutil/python-dateutil_1.5+dfsg-1ubuntu1_all.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gnome-python-desktop/python-rsvg_2.32.0+dfsg-3_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/i/imagemagick/imagemagick_6.7.7.10-6ubuntu3_amd64.deb
sudo dpkg -i *.deb

但这是一种困难的方法,您必须以相同的方式下载并安装每个缺失且无法安装的依赖项。

  1. 搜索 64 位 Trusty 软件包这里
  2. 下载wget <URL>
  3. 安装sudo dpkg -i <DEB_FILE_NAME>

或者尝试Tor,我怀疑,你的提供商和/或国家限制存在问题:

sudo apt-get install tor
sudo apt-get install torsocks

如果上述命令不起作用,请使用dpkg

wget http://mirrors.kernel.org/ubuntu/pool/universe/t/tor/tor_0.2.4.27-1build0.14.04.‌​1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/t/torsocks/torsocks_1.3-3_amd64.d‌​eb
sudo dpkg -i tor*.deb

现在更新并安装

sudo torify apt-get update
sudo torify apt-get install openastro.org

答案2

尝试以此方式安装。

只需按下键盘上的Ctrl+ Alt+T即可打开终端。打开后,运行以下命令:

sudo add-apt-repository ppa:pellesimon/ppa
sudo apt-get update
sudo apt-get install openastro.org 

相关内容