APT at ubuntu 13.04: unable to install packages (with console-output as requested in PackageManagerTroubleshootingProcedure)

Asked by Stefan Fedl

hi guys,

I am facing problems updating my apt-archive as well as installing any additional package e.g. Java. I switched to the main update server and disabled all PPAs, since the error suddenly occurred, but still not successful. I am using the latest ubuntu 13.04 release.

I am now posting my console output with all the necesssary steps as described in https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure:

[code]
stefan@Stefan-NB:~$ sudo grep -R proxy /etc/apt/*
[sudo] password for stefan:
/etc/apt/apt.conf:Acquire::http::proxy "http://87.248.188.203:8080/";
/etc/apt/apt.conf:Acquire::https::proxy "https://87.248.188.203:0/";
stefan@Stefan-NB:~$ grep proxy /etc/environment
http_proxy="http://87.248.188.203:8080/"
https_proxy="https://87.248.188.203:0/"
stefan@Stefan-NB:~$ echo $http_proxy
http://87.248.188.203:8080/
stefan@Stefan-NB:~$ echo $ftp_proxy

stefan@Stefan-NB:~$ grep proxy /etc/bash.bashrcgrep proxy /etc/bash.bashrcgrep proxy /etc/bash.bashrc^C
stefan@Stefan-NB:~$ grep proxy /etc/bash.bashrc
stefan@Stefan-NB:~$ grep proxy ~/.bashrc
stefan@Stefan-NB:~$ cat /etc/apt/apt.conf
Acquire::http::proxy "http://87.248.188.203:8080/";
Acquire::https::proxy "https://87.248.188.203:0/";
stefan@Stefan-NB:~$ sudo fuser -vvv /var/lib/dpkg/lock
stefan@Stefan-NB:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"
stefan@Stefan-NB:~$ uname -a
Linux Stefan-NB 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:46:08 UTC 2013 i686 i686 i686 GNU/Linux
stefan@Stefan-NB:~$ sudo rm /var/lib/apt/lists/lock
stefan@Stefan-NB:~$ sudo rm /var/lib/dpkg/lock
stefan@Stefan-NB:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
stefan@Stefan-NB:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
stefan@Stefan-NB:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
stefan@Stefan-NB:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
stefan@Stefan-NB:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
stefan@Stefan-NB:~$ sudo rm -rf /var/lib/dpkg/updates/*
stefan@Stefan-NB:~$ sudo rm -rf /var/lib/apt/lists
stefan@Stefan-NB:~$ sudo rm /var/cache/apt/*.bin
stefan@Stefan-NB:~$ sudo mkdir /var/lib/apt/lists
stefan@Stefan-NB:~$ sudo mkdir /var/lib/apt/lists/partial
stefan@Stefan-NB:~$ LANG=C;sudo apt-get clean
stefan@Stefan-NB:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
stefan@Stefan-NB:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-3.8.0-19* linux-headers-3.8.0-19-generic*
  linux-image-3.8.0-19-generic* linux-image-extra-3.8.0-19-generic*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
40 not fully installed or removed.
After this operation, 195 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 214461 files and directories currently installed.)
Removing linux-headers-3.8.0-19-generic ...
Removing linux-headers-3.8.0-19 ...
Removing linux-image-extra-3.8.0-19-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
update-initramfs: Deleting /boot/initrd.img-3.8.0-19-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-26-generic
Found initrd image: /boot/initrd.img-3.8.0-26-generic
Found linux image: /boot/vmlinuz-3.8.0-25-generic
Found initrd image: /boot/initrd.img-3.8.0-25-generic
Found linux image: /boot/vmlinuz-3.8.0-19-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Purging configuration files for linux-image-extra-3.8.0-19-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
Removing linux-image-3.8.0-19-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
update-initramfs: Deleting /boot/initrd.img-3.8.0-19-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-26-generic
Found initrd image: /boot/initrd.img-3.8.0-26-generic
Found linux image: /boot/vmlinuz-3.8.0-25-generic
Found initrd image: /boot/initrd.img-3.8.0-25-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Purging configuration files for linux-image-3.8.0-19-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic
Setting up libssl1.0.0:i386 (1.0.1c-4ubuntu8.1) ...
Setting up libdrm2:i386 (2.4.43-0ubuntu1.1) ...
Setting up libdrm-intel1:i386 (2.4.43-0ubuntu1.1) ...
Setting up libdrm-nouveau2:i386 (2.4.43-0ubuntu1.1) ...
Setting up libdrm-radeon1:i386 (2.4.43-0ubuntu1.1) ...
Setting up libqtcore4:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-xml:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-dbus:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up qdbus (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-network:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-script:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-sql:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-xmlpatterns:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-sql-sqlite:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-test:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up linux-image-3.8.0-26-generic (3.8.0-26.38) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-26-generic
Found initrd image: /boot/initrd.img-3.8.0-26-generic
Found linux image: /boot/vmlinuz-3.8.0-25-generic
Found initrd image: /boot/initrd.img-3.8.0-25-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Setting up compiz-core (1:0.9.9~daily13.06.19~13.04-0ubuntu1) ...
Setting up libdecoration0 (1:0.9.9~daily13.06.19~13.04-0ubuntu1) ...
Setting up compiz-plugins-default (1:0.9.9~daily13.06.19~13.04-0ubuntu1) ...
Setting up libcompizconfig0 (1:0.9.9~daily13.06.19~13.04-0ubuntu1) ...
Setting up compiz-gnome (1:0.9.9~daily13.06.19~13.04-0ubuntu1) ...
Setting up compiz (1:0.9.9~daily13.06.19~13.04-0ubuntu1) ...
Setting up flashplugin-installer (11.2.202.297ubuntu0.13.04.1) ...
Setting up linux-image-extra-3.8.0-26-generic (3.8.0-26.38) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8.0-26-generic /boot/vmlinuz-3.8.0-26-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-26-generic
Found initrd image: /boot/initrd.img-3.8.0-26-generic
Found linux image: /boot/vmlinuz-3.8.0-25-generic
Found initrd image: /boot/initrd.img-3.8.0-25-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Setting up linux-image-generic (3.8.0.26.44) ...
Setting up linux-headers-3.8.0-26 (3.8.0-26.38) ...
Setting up linux-headers-3.8.0-26-generic (3.8.0-26.38) ...
Setting up linux-headers-generic (3.8.0.26.44) ...
Setting up linux-generic (3.8.0.26.44) ...
Setting up linux-generic-pae (3.8.0.26.44) ...
Setting up linux-headers-generic-pae (3.8.0.26.44) ...
Setting up linux-libc-dev:i386 (3.8.0-26.38) ...
Setting up openssl (1.0.1c-4ubuntu8.1) ...
Setting up libqtgui4:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-declarative:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-designer:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-help:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-opengl:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-scripttools:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Setting up libqt4-svg:i386 (4:4.8.4+dfsg-0ubuntu9.2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
stefan@Stefan-NB:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Err http://archive.ubuntu.com raring Release.gpg
  Could not connect to 87.248.188.203:8080 (87.248.188.203). - connect (111: Connection refused)
Err http://archive.ubuntu.com raring-updates Release.gpg
  Unable to connect to 87.248.188.203:8080:
Err http://archive.ubuntu.com raring-backports Release.gpg
  Unable to connect to 87.248.188.203:8080:
Err http://archive.ubuntu.com raring-security Release.gpg
  Unable to connect to 87.248.188.203:8080:
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/Release.gpg Could not connect to 87.248.188.203:8080 (87.248.188.203). - connect (111: Connection refused)

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-updates/Release.gpg Unable to connect to 87.248.188.203:8080:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-backports/Release.gpg Unable to connect to 87.248.188.203:8080:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-security/Release.gpg Unable to connect to 87.248.188.203:8080:

W: Some index files failed to download. They have been ignored, or old ones used instead.
stefan@Stefan-NB:~$ sudo dpkg --configure -a
stefan@Stefan-NB:~$ sudo dpkg --clear-avail
stefan@Stefan-NB:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
stefan@Stefan-NB:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
stefan@Stefan-NB:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Err http://archive.ubuntu.com raring Release.gpg
  Could not connect to 87.248.188.203:8080 (87.248.188.203). - connect (111: Connection refused)
Err http://archive.ubuntu.com raring-updates Release.gpg
  Unable to connect to 87.248.188.203:8080:
Err http://archive.ubuntu.com raring-backports Release.gpg
  Unable to connect to 87.248.188.203:8080:
Err http://archive.ubuntu.com raring-security Release.gpg
  Unable to connect to 87.248.188.203:8080:
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/Release.gpg Could not connect to 87.248.188.203:8080 (87.248.188.203). - connect (111: Connection refused)

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-updates/Release.gpg Unable to connect to 87.248.188.203:8080:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-backports/Release.gpg Unable to connect to 87.248.188.203:8080:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-security/Release.gpg Unable to connect to 87.248.188.203:8080:

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
stefan@Stefan-NB:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release i386 (20130424)]/ raring main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://archive.ubuntu.com/ubuntu raring main restricted
     6 deb-src http://archive.ubuntu.com/ubuntu raring restricted main multiverse universe #Added by software-properties
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://archive.ubuntu.com/ubuntu raring-updates main restricted
    11 deb-src http://archive.ubuntu.com/ubuntu raring-updates restricted main multiverse universe #Added by software-properties
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://archive.ubuntu.com/ubuntu raring universe
    17 deb http://archive.ubuntu.com/ubuntu raring-updates universe
    18
    19 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    20 ## team, and may not be under a free licence. Please satisfy yourself as to
    21 ## your rights to use the software. Also, please note that software in
    22 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    23 ## security team.
    24 deb http://archive.ubuntu.com/ubuntu raring multiverse
    25 deb http://archive.ubuntu.com/ubuntu raring-updates multiverse
    26
    27 ## N.B. software from this repository may not have been tested as
    28 ## extensively as that contained in the main release, although it includes
    29 ## newer versions of some applications which may provide useful features.
    30 ## Also, please note that software in backports WILL NOT receive any review
    31 ## or updates from the Ubuntu security team.
    32 deb http://archive.ubuntu.com/ubuntu raring-backports main restricted universe multiverse
    33 deb-src http://archive.ubuntu.com/ubuntu raring-backports main restricted universe multiverse #Added by software-properties
    34
    35 deb http://archive.ubuntu.com/ubuntu raring-security main restricted
    36 deb-src http://archive.ubuntu.com/ubuntu raring-security restricted main multiverse universe #Added by software-properties
    37 deb http://archive.ubuntu.com/ubuntu raring-security universe
    38 deb http://archive.ubuntu.com/ubuntu raring-security multiverse
    39
    40 ## Uncomment the following two lines to add software from Canonical's
    41 ## 'partner' repository.
    42 ## This software is not part of Ubuntu, but is offered by Canonical and the
    43 ## respective vendors as a service to Ubuntu users.
    44 # deb http://archive.canonical.com/ubuntu raring partner
    45 # deb-src http://archive.canonical.com/ubuntu raring partner
    46
    47 ## This software is not part of Ubuntu, but is offered by third-party
    48 ## developers who want to ship their latest software.
    49 # deb http://extras.ubuntu.com/ubuntu raring main
    50 # deb-src http://extras.ubuntu.com/ubuntu raring main
stefan@Stefan-NB:~$
[/code]

This is the very first time I am facing such a problem with APT. With 12.04 and previous versions, there wasn't such a problem. I love to use it, therefore I am very thankful for your help.

kind regards,
stefan

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Stefan Fedl
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Krüger (thkrueger) said :
#1

Your proxy settings are bad. Remove the proxy or configure it correctly in the Network Settings in the System Settings menu!

Revision history for this message
Daniel Letzeisen (dtl131) said :
#2

Your proxy server could be down. Can you ping the server?
ping 87.248.188.203

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#3

As you can see the primary problem has been resolved. I mean, you installed-updated the packages, but sometimes it seems that the proxy server does not work correctly . See the message (111: Connection refused) .

You must configure the proxy correctly (username / password) or remove it completely. Also maybe this is not an error due to username/password, but due to a fault of the proxy server itself.

Regards
 NikTh

Revision history for this message
Stefan Fedl (stefan-fedl) said :
#4

hi guys,

thanks for the prompt answers! i haven't configured a proxy in my network settings... If I knew how to post screenshots (or code snippets in a formatted way) here, I'd show you.

And yes, I can ping the IP address from above (which is supposed to be the proxy):
stefan@Stefan-NB:~$ ping 87.248.188.203
PING 87.248.188.203 (87.248.188.203) 56(84) bytes of data.
64 bytes from 87.248.188.203: icmp_req=1 ttl=53 time=161 ms
64 bytes from 87.248.188.203: icmp_req=2 ttl=53 time=79.0 ms
64 bytes from 87.248.188.203: icmp_req=3 ttl=53 time=107 ms

i have no idea why this is suddenly broken since it worked after the installation, and somehow "broke itself" some days after the installation.

regards,
stefan

Revision history for this message
Stefan Fedl (stefan-fedl) said :
#5

by the way: I also deleted "http_proxy" and "https_proxy" out of my environments file at /etc/environment, so it should now really be connected directly. Still, I am facing the same problem with APT. Maybe I have to add that I am new to Ubuntu (and all the shell configuration stuff).

Anywhere else where I should look for a proxy?

Revision history for this message
Stefan Fedl (stefan-fedl) said :
#6

Problem solved: removed proxy also from APT-config at /etc/apt/apt.conf
thanks guys!

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#7

The following Terminal output showed in which files you were storing proxy server information:

stefan@Stefan-NB:~$ grep proxy /etc/environment
http_proxy="http://87.248.188.203:8080/"
https_proxy="https://87.248.188.203:0/"

stefan@Stefan-NB:~$ cat /etc/apt/apt.conf
Acquire::http::proxy "http://87.248.188.203:8080/";
Acquire::https::proxy "https://87.248.188.203:0/";

The first place to look for answers is always in the Terminal output you sent us.