安装 Anki 时出现问题:未满足的依赖关系

安装 Anki 时出现问题:未满足的依赖关系

我正在尝试安装 Anki SRShttp://ankisrs.net/在(新安装的)Ubuntu 13.04 上,但运行得并不快:

 The following packages have unmet dependencies:
 anki: Depends: python (>= 2.7.1-0ubuntu2) but 2.7.3-0ubuntu2.2 is to be installed
 Depends: python-qt4 (>= 4.4) but 4.9.1-2ubuntu1 is to be installed
 Depends: python-simplejson (>= 1.7.3) but 2.3.2-1 is to be installed

我该如何解决这个问题?

答案1

我认为发生的情况是dpkg package.deb没有自动安装依赖项。您应该能够在输出中看到这一点(参见下面的示例)。因此,在运行此行以安装.deb文件后

sudo dpkg -i anki-2.0.33.deb

您应该运行此行来安装未满足的依赖项

sudo apt-get -f install

-f选项代表“修复”,因此 apt-get 将下载所有未满足的依赖项(假设它们在 apt-get 包索引中)。有关更多信息,请查看超级用户的这个答案

这是我运行文件时的输出。请注意,在第二个块中,如何apt-get安装未满足的依赖项,其中一个依赖项python-sqlalchemy如另一个答案中所述。之后,anki 工作正常。

$ sudo dpkg -i anki-2.0.33.deb
Selecting previously unselected package anki.
(Reading database ... 196396 files and directories currently installed.)
Preparing to unpack anki-2.0.33.deb ...
Unpacking anki (2.0.33) ...
dpkg: dependency problems prevent configuration of anki:
 anki depends on mplayer | mplayer2; however:
  Package mplayer is not installed.
  Package mplayer2 is not installed.
 anki depends on lame; however:
  Package lame is not installed.
 anki depends on python-sqlalchemy; however:
  Package python-sqlalchemy is not installed.

dpkg: error processing package anki (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Errors were encountered while processing:
 anki

注意缺少的依赖项是如何下载的

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  esound-common lame libaacs0 libaudiofile1 libbluray1 libesd0 libgif4
  libpostproc52 libsdl1.2debian libsvga1 libvdpau1 mplayer python-sqlalchemy
  python-sqlalchemy-ext
Suggested packages:
  libbluray-bdj pulseaudio-esound-compat nvidia-vdpau-driver vdpau-driver
  mplayer-doc netselect fping python-sqlalchemy-doc python-psycopg2
  python-mysqldb python-kinterbasdb python-pymssql
The following NEW packages will be installed:
  esound-common lame libaacs0 libaudiofile1 libbluray1 libesd0 libgif4
  libpostproc52 libsdl1.2debian libsvga1 libvdpau1 mplayer python-sqlalchemy
  python-sqlalchemy-ext
0 upgraded, 14 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 3,729 kB of archives.
After this operation, 10.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

答案2

我下载了安基并尝试安装,但遇到了类似的问题。以下是我所做的。

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

sudo apt-get install python-sqlalchemy
sudo dpkg -i <file_name>.deb

sudo apt-get -f install在安装 Anki 之前, 您可能需要执行。

在此处输入图片描述

相关内容