如何安装 aptitude?

如何安装 aptitude?

我尝试在全新安装的 Ubuntu Server 14.04(在 docker 上)上安装 aptitude,得到以下结果:

Step 2 : RUN apt-get install aptitude
 ---> Running in 257ad5947629
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  apt-xapian-index aptitude-common iso-codes libboost-iostreams1.54.0
  libclass-accessor-perl libcwidget3 libept1.4.12 libio-string-perl
  libparse-debianchangelog-perl libpython-stdlib libpython2.7-minimal
  libpython2.7-stdlib libsigc++-2.0-0c2a libsub-name-perl libtimedate-perl
  libxapian22 python python-apt python-apt-common python-chardet python-debian
  python-minimal python-six python-xapian python2.7 python2.7-minimal xz-utils
Suggested packages:
  app-install-data python-xdg aptitude-doc-en aptitude-doc tasksel debtags
  isoquery libcwidget-dev libhtml-parser-perl libhtml-template-perl
  libxml-simple-perl xapian-tools python-doc python-tk python-apt-dbg
  python-gtk2 python-vte python-apt-doc xapian-doc python2.7-doc binutils
  binfmt-support
The following NEW packages will be installed:
  apt-xapian-index aptitude aptitude-common iso-codes libboost-iostreams1.54.0
  libclass-accessor-perl libcwidget3 libept1.4.12 libio-string-perl
  libparse-debianchangelog-perl libpython-stdlib libpython2.7-minimal
  libpython2.7-stdlib libsigc++-2.0-0c2a libsub-name-perl libtimedate-perl
  libxapian22 python python-apt python-apt-common python-chardet python-debian
  python-minimal python-six python-xapian python2.7 python2.7-minimal xz-utils
0 upgraded, 28 newly installed, 0 to remove and 5 not upgraded.
Need to get 9754 kB of archives.
After this operation, 49.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
2014/07/26 19:22:30 The command [/bin/sh -c apt-get install aptitude] returned a non-zero code: 1

我已经搞定了 :

  • apt-get update
  • apt-get install aptitude

无法执行,apt-get upgrade因为会引发另一个错误。

很紧张,担心这不起作用...很抱歉。

答案1

该命令似乎是作为没有输入的脚本运行的,因此它接收EOF在提示确认时。这会导致apt-get中止。如果您可以修改脚本,请使用以下-y选项:

/bin/sh -c 'apt-get install -y aptitude'

答案2

我已经做好了:

  • apt-get 更新
  • apt-get 安装 aptitude

你需要做:

sudo apt-get update
sudo apt-get install aptitude

因为您正在使用这些命令对系统进行更改,并且它们需要 root“su”权限。运行这些命令后,它将正常工作。“Cinamon 17.1 Mate 用户”

答案3

尝试从以下位置手动下载packages.ubuntu.com并使用 dpkg 安装它。

相关内容