3

Trouble started when I used usb-creator-gtk to create a bootable 14.04.3 USB flash drive. As the app was actually running, synaptic (v 0.81.1) was launched (not by me). Its GUI stayed on screen after usb-creator-gtk quietly exited (no error message). I terminated synaptic manually in the GUI.

Now software-center crashes immediately upon launching it from either cli or gui. synaptic on the other hand opens and seems to run correctly. A red and white "one-way street" icon now resides on my Unity bar. Clicking on it, I read above a few menu items:

An error occurred. Please run Package Manager from the right-click menu or run apt-get from a terminal to see what is wrong. The error message was: Unknown Error: '' (E:Opening /etc/apt/source.list - ifstream::ifstream(13:Permission denied))'. This usually means that your installed packages have unmet dependencies.

What I tried:

-1- Below the above blurb are a a few functional menu items, among them "Start Package Manager". That starts synaptic in the GUI. Menu "Edit//Reload Package Information" yields:

**Could not load all repo items**<BR>
Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/restricted/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/restricted/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Some index files failed to download. They have been ignored, or old ones used instead.

I never had a CD-ROM for Trusty 14.04.3, so I went on to troubleshoot...

-2- Below that, I checked out menu item "Software & Updates".
In its usual GUI window, all settings are blanked, all extra ppa's I added in the past 18 months are there. Upon closing a crash report is generated. I checked it in/var/crash:

$ ls -AFls /var/crash
   total 4512
   0 -rw-rw---- 1 root     whoopsie       0 Dec 29 09:47 .lock
  68 -rw-r----- 1 user      whoopsie   62385 Dec 29 11:06 _usr_bin_software-properties-gtk.1000.crash
   0 -rw-rw---- 1 user      whoopsie       0 Dec 29 11:06 _usr_bin_software-properties-gtk.1000.upload
   0 -rw------- 1 whoopsie whoopsie       0 Dec 29 11:06 _usr_bin_software-properties-gtk.1000.uploaded
  64 -rw-r----- 1 user      whoopsie   59440 Dec 29 11:32 _usr_bin_update-manager.1000.crash
   0 -rw-rw---- 1 user      whoopsie       0 Dec 29 11:32 _usr_bin_update-manager.1000.upload
   0 -rw------- 1 whoopsie whoopsie       0 Dec 29 11:32 _usr_bin_update-manager.1000.uploaded
  28 -rw-r----- 1 user      whoopsie   24652 Dec 29 11:08 _usr_share_oneconf_oneconf-service.1000.crash
   0 -rw-rw---- 1 user      whoopsie       0 Dec 29 11:08 _usr_share_oneconf_oneconf-service.1000.upload
   0 -rw------- 1 whoopsie whoopsie       0 Dec 29 11:08 _usr_share_oneconf_oneconf-service.1000.uploaded

Relevant one is here. The gist of it is:

Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1149, in detect_drivers
     self.apt_cache = apt.Cache()
   File "/usr/lib/python3/dist-packages/apt/cache.py", line 107, in __init__
     self.open(progress)
   File "/usr/lib/python3/dist-packages/apt/cache.py", line 155, in open
     self._list.read_main_list()
 SystemError: E:Opening /etc/apt/sources.list - ifstream::ifstream (13: Permission denied)
UserGroups: adm cdrom dip lp lpadmin plugdev sambashare scanner sudo wireshark www-data
_LogindSession: /user/1000.user/c2.session
Architecture: amd64
DistroRelease: Ubuntu 14.04
Title: software-properties-gtk crashed with SystemError in open(): E:Opening /etc/apt/sources.list - ifstream::ifstream (13: Permission denied)
Uname: Linux 3.16.0-50-generic x86_64
UnreportableReason: E:Opening /etc/apt/sources.list - ifstream::ifstream (13: Permission denied), E:The list of sources could not be read., E:The package lists or status file could not be parsed or opened.

-3- Since USC is broken I searched all installed packages with filter software-center in synaptic and tried to reinstall them followed by reboot using various ways:

$ sudo apt-get --reinstall install software-center software-center-apt-daemon-plugins appinstall-data oneconf oneconf-common python3-oneconf python-oneconf

$ sudo aptitude reinstall software-center software-center-apt-daemon-plugins appinstall-data oneconf oneconf-common python3-oneconf python-oneconf

Both exited quietly, but nothing changed after reboot, so I tried...

-4- Rebuilding the source list:

$ sudo rm -f /var/lib/apt/lists* && sudo apt-get update

Output to stdout is here.

Beyond the stated need for a 14.04.3 CD-ROM I do not have and my rebuilding the apt source list, I seriously could use some help. Not having any update path is kinda bad.

EDIT 1:

$ ls -lA /etc/apt/sources.list
-rw-r----- 1 root root 3022 Dec 29 10:38 /etc/apt/sources.list

... had never realized before that /etc/apt/sources.list was "root root". Contents of /etc/apt/sources.list show as first uncommented line: deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted I think this must have been inserted somehow when I launched usb-creator-gtk yesterday. I do not recall at all having seen that line before in there.

2

From your output

$ ls -lA /etc/apt/sources.list
-rw-r----- 1 root root 3022 Dec 29 10:38 /etc/apt/sources.list

we can see that the file's permissions prohibit read access for non-root users and groups. This is wrong and causing the errors you encounter.

To fix these permissions (to be sure, we'll better fix it for all files in /etc/apt - no worries, they're readable to other users by default and even must be), please run the following command:

sudo chmod -R o+r /etc/apt

I'll explain you what its parts are doing:

  • sudo: Run the following command as root user
  • chmod: command to change file permissions
  • -R or --recursive: parameter of chmod, to operate recursively on the given directory and all contained files and subdirectories
  • o+r: permission modification rule for chmod, tells it to grant (+) all others which are not the owner/group (o) reading permissions (r).
  • /etc/apt: the file/directory argument for chmod

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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