3

I was using Ubuntu 11.10 and installed the KDE Desktop and I was happy with that. But I wanted to get my old login screen back so I removed the package kdm. When I boot my PC now, it keeps booting and nothing happens.

How can I add the kdm package again? I got into recovery mode, terminal and tried to execute sudo apt-get instal kdm but I got an error message.

W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened

I'm pretty desperate now, could somebody please help me?

  • You can show the correct message with LC_ALL=C sudo apt-get install kdm. I think it could be a read-only mount problem. – enzotib Dec 25 '11 at 15:36
  • @enzotib Thanks, I updated the error message above! Do you have any idea how I can fix that? – js-coder Dec 25 '11 at 15:41
  • 2
    I cannot remember just now how recovery works, so my tentative would be to remount / in rw mode, with mount -o remount,rw / – enzotib Dec 25 '11 at 15:43
  • Have you tried booting normally, going to tty1 with Ctrl-Alt-F1, logging in and starting the GUI with startx? – enzotib Dec 25 '11 at 15:48
  • @enzotib Thank you so much, you helped me so much! :) I suggest you make a new answer about the tty1 approach, I will accept+up vote it then. – js-coder Dec 25 '11 at 16:07
0

I suggest you to go to tty1 with Ctrl-Alt-F1, log in and then start the GUI with startx.

At that point you can reinstall the package kdm.

2

If you need to install package in recovery mode, you can first ask for repairing packages (it will mount / in rw mode as suggested by enzotib) and then, when you use the root terminal, you will be able to install new packages and avoid the error you mentioned.

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.