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

  • 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

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

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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