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?

Oli
  • 299,380
js-coder
  • 2,257

3 Answers3

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.

0

I'm going to put @enzotib's comment here, because I missed it the first time coming here.

  1. Enter "Recovery Mode" in grub

  2. select, "Drop To Root Shell Prompt (read-only mode)"

  3. In the shell execute the command below to re-mount / in read/write mode:

    mount -o remount,rw /
    

I was unable to login to tty2 in ubuntu 20.04 as the root password is not defined by default, and a the default user setup on system install doesn't apparently have login access here.

monkut
  • 291
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.

enzotib
  • 96,093