Update Manager will not start

Asked by Ed Dunlop

I am running 11.04 Natty updated to the recent Firefox 6 and Linux Kernal 2.6.38-11-generic-pae (64bit) on August 22nd.

After this update, "Update Manager" and "Computer Janitor" will not start (no error messages). When I try to start "Synaptic Package Manager", I get the following Error message:

E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
(((The socket file 99synaptic listed above does exist.)))

I have tried the 6 step "Package Manager Troubleshooting Procedure" listed at:
https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure
Results are:
ed@ed-desktop:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for ed:
ed@ed-desktop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
ed@ed-desktop:~$ uname -a
Linux ed-desktop 2.6.38-11-generic-pae #48-Ubuntu SMP Fri Jul 29 20:51:21 UTC 2011 i686 athlon i386 GNU/Linux
ed@ed-desktop:~$ sudo rm /var/lib/apt/lists/lock
ed@ed-desktop:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
ed@ed-desktop:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
ed@ed-desktop:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
ed@ed-desktop:~$ sudo rm -rf /var/lib/dpkg/updates/*
ed@ed-desktop:~$ sudo rm -rf /var/lib/apt/lists
ed@ed-desktop:~$ sudo rm /var/cache/apt/*.bin
ed@ed-desktop:~$ sudo mkdir /var/lib/apt/lists
ed@ed-desktop:~$ sudo mkdir /var/lib/apt/lists/partial
ed@ed-desktop:~$ LANG=C;sudo apt-get clean
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$ LANG=C;sudo apt-get autoclean
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$ LANG=C;sudo apt-get --purge autoremove
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$ sudo dpkg --clear-avail
ed@ed-desktop:~$ sudo dpkg --configure -a
Setting up python-aptdaemon (0.41+bzr646-0ubuntu2.1) ...
Setting up linux-image-2.6.38-11-generic-pae (2.6.38-11.48) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.38-11-generic-pae
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
 * dkms: running auto installation service for kernel 2.6.38-11-generic-pae
 * fglrx (8.840)... [ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
run-parts: executing /etc/kernel/postinst.d/nvidia-common 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
Traceback (most recent call last):
  File "/usr/bin/nvidia-detector", line 3, in <module>
    from NvidiaDetector.nvidiadetector import NvidiaDetection, NoDatadirError
  File "/usr/lib/python2.7/dist-packages/NvidiaDetector/nvidiadetector.py", line 26, in <module>
    import apt
  File "/usr/lib/python2.7/dist-packages/apt/__init__.py", line 35, in <module>
    apt_pkg.init()
SystemError: E:Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.38-11-generic-pae.postinst line 1010.
dpkg: error processing linux-image-2.6.38-11-generic-pae (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic-pae:
 linux-image-generic-pae depends on linux-image-2.6.38-11-generic-pae; however:
  Package linux-image-2.6.38-11-generic-pae is not configured yet.
dpkg: error processing linux-image-generic-pae (--configure):
 dependency problems - leaving unconfigured
Setting up aptdaemon-data (0.41+bzr646-0ubuntu2.1) ...
Setting up linux-libc-dev (2.6.38-11.48) ...
Setting up python-aptdaemon.gtk3widgets (0.41+bzr646-0ubuntu2.1) ...
Setting up libgp11-0 (2.92.92.is.2.32.1-0ubuntu2.1) ...
Setting up libpam-gnome-keyring (2.92.92.is.2.32.1-0ubuntu2.1) ...
Setting up linux-headers-2.6.38-11 (2.6.38-11.48) ...
Setting up python-aptdaemon.gtkwidgets (0.41+bzr646-0ubuntu2.1) ...
dpkg: dependency problems prevent configuration of linux-generic-pae:
 linux-generic-pae depends on linux-image-generic-pae (= 2.6.38.11.26); however:
  Package linux-image-generic-pae is not configured yet.
dpkg: error processing linux-generic-pae (--configure):
 dependency problems - leaving unconfigured
Setting up aptdaemon (0.41+bzr646-0ubuntu2.1) ...
Setting up python-aptdaemon-gtk (0.41+bzr646-0ubuntu2.1) ...
Setting up linux-headers-2.6.38-11-generic-pae (2.6.38-11.48) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
 * dkms: running auto installation service for kernel 2.6.38-11-generic-pae
 * fglrx (8.840)... [ OK ]
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
Traceback (most recent call last):
  File "/usr/bin/nvidia-detector", line 3, in <module>
    from NvidiaDetector.nvidiadetector import NvidiaDetection, NoDatadirError
  File "/usr/lib/python2.7/dist-packages/NvidiaDetector/nvidiadetector.py", line 26, in <module>
    import apt
  File "/usr/lib/python2.7/dist-packages/apt/__init__.py", line 35, in <module>
    apt_pkg.init()
SystemError: E:Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
run-parts: /etc/kernel/header_postinst.d/nvidia-common exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.38-11-generic-pae.postinst line 110.
dpkg: error processing linux-headers-2.6.38-11-generic-pae (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up firefox (6.0+build1+nobinonly-0ubuntu0.11.04.1) ...
Please restart all running instances of firefox, or you will experience problems.
Setting up firefox-locale-en (6.0+build1+nobinonly-0ubuntu0.11.04.1) ...
Setting up firefox-globalmenu (6.0+build1+nobinonly-0ubuntu0.11.04.1) ...
Setting up libgcr0 (2.92.92.is.2.32.1-0ubuntu2.1) ...
Setting up gnome-keyring (2.92.92.is.2.32.1-0ubuntu2.1) ...
Setting up firefox-branding (6.0+build1+nobinonly-0ubuntu0.11.04.1) ...
dpkg: dependency problems prevent configuration of linux-headers-generic-pae:
 linux-headers-generic-pae depends on linux-headers-2.6.38-11-generic-pae; however:
  Package linux-headers-2.6.38-11-generic-pae is not configured yet.
dpkg: error processing linux-headers-generic-pae (--configure):
 dependency problems - leaving unconfigured
Setting up firefox-gnome-support (6.0+build1+nobinonly-0ubuntu0.11.04.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for menu ...
Errors were encountered while processing:
 linux-image-2.6.38-11-generic-pae
 linux-image-generic-pae
 linux-generic-pae
 linux-headers-2.6.38-11-generic-pae
 linux-headers-generic-pae
ed@ed-desktop:~$ LANG=C;sudo apt-get -f install
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$ LANG=C;sudo apt-get --fix-missing install
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)
ed@ed-desktop:~$

<<<< End of Listing >>>>

I have used Update Manager many times before and I assume that Update Manager should continue to work. Let me know if you need more info.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Ed Dunlop (ed-computer) said :
#1

Regarding Step #1 of the "Package Manager Troubleshooting Procedure", I am not sure that I switched from the regional mirror to the main mirror because there was no way to get to those options since the package is not working!

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

Please first follow the instructions regarding "recreating file /etc/apt/apt.conf.d/99synaptic" at the end of the following thread:

http://askubuntu.com/questions/2294/how-to-fix-a-package-manager-error-in-notification-area-after-upgrading-a-fresh-i

Then run the following command to reinstall synaptic:

sudo apt-get update; sudo apt-get install aptitude; sudo aptitude purge synaptic; sudo aptitude install synaptic

Then retest synaptic.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

andy@D420:~$ cat /etc/apt/apt.conf.d/99synaptic
APT::Install-Recommends "true";

If you run:

gksudo gedit /etc/apt/apt.conf.d/99synaptic

Then add the line my command outputted, save the new file and close gedit. Retry apt-get. If the file is the same then let us know and we will explore other avenues. If your file has different text then paste it here so we can analyse.

Revision history for this message
Ed Dunlop (ed-computer) said :
#4

I ran the fix Mark recommended. It gave several of the same errors: [[E: Opening configuration file /etc/apt/apt.conf.d/99synaptic - ifstream::ifstream (6: No such device or address)]]

/etc/apt/apt.conf.d/99synaptic is currently 0 bytes long, in other words empty.

Revision history for this message
Ed Dunlop (ed-computer) said :
#5

Here is a listing of the directory:

ed@ed-desktop:~$ cd /etc/apt/apt.conf.d
ed@ed-desktop:/etc/apt/apt.conf.d$ ls -l
total 48
-rw-r--r-- 1 root root 40 2011-01-19 15:22 00trustcdrom
-rw-r--r-- 1 root root 430 2011-04-26 13:48 01autoremove
-rw-r--r-- 1 root root 9 2010-04-15 00:33 01ubuntu
-rw-r--r-- 1 root root 157 2010-04-09 08:16 05aptitude
-rw-r--r-- 1 root root 168 2011-03-03 11:30 10periodic
-rw-r--r-- 1 root root 108 2010-04-13 16:45 15update-stamp
-rw-r--r-- 1 root root 85 2010-04-13 16:45 20archive
-rw-r--r-- 1 root root 121 2011-04-26 13:48 20changelog
-rw-r--r-- 1 root root 243 2010-03-31 04:57 20dbus
-rw-r--r-- 1 root root 1921 2011-04-12 05:22 50unattended-upgrades
-rw-r--r-- 1 root root 182 2010-04-09 10:33 70debconf
srwsr-sr-- 1 3435973836 3435973836 0 1942-10-12 18:42 99synaptic
-rw-r--r-- 1 root root 231 2010-06-01 09:19 99update-notifier
ed@ed-desktop:/etc/apt/apt.conf.d$

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#6

Seems not good... my 99synaptic file is with this permission:

 ls -la /etc/apt/apt.conf.d/99synaptic
-rw-r--r-- 1 root root 32 2011-06-07 19:39 /etc/apt/apt.conf.d/99synaptic

and it contain a single row, this:

APT::Install-Recommends "true";

so please recreate it with this terminal command:

gksudo gedit /etc/apt/apt.conf.d/99synaptic

put the row:

APT::Install-Recommends "true";

save and exit then change owner and permissions, type:

sudo chown root.root /etc/apt/apt.conf.d/99synaptic
sudo chmod 644 /etc/apt/apt.conf.d/99synaptic

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Can you also give the output of:

ls -la /etc/apt/apt.conf.d/

Just to double check what is going on

Revision history for this message
Ed Dunlop (ed-computer) said :
#8

Success! Thanks Marco. [Andrew: there were no hidden files in that directory.]

I first moved the 99synaptic file to preserve it with:
mv 99synaptic 99synaptic.old

then followed your instructions to recreate 99synaptic. This worked and fixed the problem.

PS: This solution does not work unless you delete or move the original 99synaptic file first.

Thank you.

Revision history for this message
Ed Dunlop (ed-computer) said :
#9

Thanks marcobra (Marco Braida), that solved my question.