11

I've tried to install aptitude on a clean install of Ubuntu Server 14.04 (on docker) and I get:

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

I've done :

  • apt-get update
  • apt-get install aptitude.

Can't do apt-get upgrade because throws another error.

So nervous that this doesn't work... Sorry about this.

3 Answers 3

13

The command seems to be run as a script with no input, so it receives EOF at the prompt for confirmation. This causes apt-get to abort. If you can modify the script, use the -y option:

/bin/sh -c 'apt-get install -y aptitude'
1
  • thanks, seems that is working.. (still installing) Scarred about the quantity of stuff that installs..
    – Totty.js
    Jul 26, 2014 at 19:47
10

I have done:

  • apt-get update
  • apt-get install aptitude

You need to do:

sudo apt-get update
sudo apt-get install aptitude

because you are making changes to your system with these commands and they require root "su" permissions. After running these commands it will work just fine. "Cinamon 17.1 Mate user"

0

Try downloading it manually from packages.ubuntu.com and installing it with dpkg.

6
  • I don't know how to do it. But may I ask why is so complicated to do stuff on ubuntu. How do people work with it when not even basic commands works?
    – Totty.js
    Jul 26, 2014 at 19:36
  • 2
    @Totty please don't jump to conclusions. This looks like there were some faulty assumptions at work behind the commands run. Is this from a script somewhere?
    – muru
    Jul 26, 2014 at 19:39
  • @Totty Did you run the whole first line as a command? Try only running apt-get install aptitude
    – jnuk
    Jul 26, 2014 at 19:41
  • @muru I'm working for a long time with Ubuntu and I always have problems with apt-get. I would like to know how to use Ubuntu, if anyone can explain. I don't believe you are doing a lot of things just to install a package. I always feel like I'm missing something because of this. In this case I've missed the -y, so is my fault..
    – Totty.js
    Jul 26, 2014 at 19:44
  • @jnuk I've installed with the answer of muru. I've missed the -y
    – Totty.js
    Jul 26, 2014 at 19:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.