2

The Ubuntu Software Center no longer lets me install software (tried to install pdfsam, and Synaptic, both give the same error):

There seems to be a programming error in aptdaemon, the software that allows you to install/remove software and to perform other package management related tasks.

Details: Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 325, in _process_transaction self._apply_changes(trans)

File "/usr/lib/python3/dist-packages/aptdaemon/pkcompat.py", line 3157, in _apply_changes install_range)

File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 1151, in _apply_changes with self._frozen_status():

File "/usr/lib/python3.4/contextlib.py", line 59, in enter return next(self.gen)

File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 1175, in _frozen_status frozen_dir = tempfile.mkdtemp(prefix="aptdaemon-frozen-status")

File "/usr/lib/python3.4/tempfile.py", line 426, in mkdtemp dir = gettempdir()

File "/usr/lib/python3.4/tempfile.py", line 370, in gettempdir tempdir = _get_default_tempdir()

File "/usr/lib/python3.4/tempfile.py", line 312, in _get_default_tempdir dirlist)

FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']

I found and tried this fix, which is featured in all the threads I could find on this problem: Cannot install any software from the Software Center due to ttf-mscorefonts-installer package error

The command sudo dpkg --configure -a does not work. Output:

sudo: unable to open /var/lib/sudo/andreas/5: No such file or directory

dpkg: error: unable to access dpkg status area: Read-only file system

Now, I am a Linux-newbie. Before Ubuntu I have used Linux Mint 15, then 16. There the system frequently froze, in particular during installation of new software via apt-get or the software center, which, upon restart, somehow screwed up my user rights (what seems to be the case here, too?) and file system. To fix it I had to reinstall Mint (repeatedly).

Some more background: A few days ago Ubuntu froze, and over lots of waiting (it didn't recover) I found the solution online: What should I do when Ubuntu freezes?

If it locks up completely, you can REISUB it, which is a safer alternative to just cold rebooting the computer.

Could this have caused the problem? Before that, Software Center worked just fine.

I switched from Mint to Ubuntu under the impression that Ubuntu is more stable and less "tinkery" than Mint. I really really don't want to switch back to Windows, but I need my laptop to work, and work reliably; thesis deadline is coming closer.

Any help is greatly appreciated!

I am using Ubuntu 14.04 LTS

akl
  • 31
  • try doing: sudo mount -o rw,remount – David Sep 16 '15 at 12:29
  • Then do what you were trying to do – David Sep 16 '15 at 12:29
  • Just to clarify, you mean? first command: sudo mount -o rw – akl Sep 16 '15 at 12:36
  • and second command: remount – akl Sep 16 '15 at 12:36
  • the command is sudo mount -o rw,remount / exactly like that with the comma, and the slash. It is basically mounting your files in read write mode instead of read only, which should allow you to do sudo dpkg-reconfigure – David Sep 16 '15 at 12:38
  • I see; so that command remounts the root / in rw – akl Sep 16 '15 at 13:15
  • but also this command cannot be executed: sudo: unable to open /var/lib/sudo/andreas/5: No such file or directory mount: cannot remount block device /dev/sdb5 read-write, is write-protected (edit: Ubuntu is mounted on sdb5, boot loader is installed on sdb, swap on sdb1, /home is mounted on the separate sda drive – akl Sep 16 '15 at 13:15
  • Ah okay so before you do either of those commands do sudo umount /dev/sdb5 – David Sep 16 '15 at 13:46
  • That did the trick! Meanwhile a second error occurred during booting (about problem finding drivers for / ), but I'll start another thread in case I cannot find a solution to it; I don't think it is related to this problem. Thanks a lot, David! – akl Sep 17 '15 at 10:32
  • Any time man, just ask. Now if you have any driver issues, I'd love to still try to help and support – David Sep 17 '15 at 10:34

1 Answers1

1

The solution by David (see above) did the trick. In case anyone stumbles upon this thread with the same problem, here the summary (credits to David and the author of the thread linked in the problem description):

sudo umount /dev/sdb5

replace [sdb5] with whatever partition your root / is mounted on. Note: it might complain that / is busy, ignore and proceed

sudo mount -o rw,remount /

sudo dpkg --configure -a

sudo apt-get update

sudo apt-get upgrade

akl
  • 31