Results 1 to 5 of 5

Thread: Ubuntu 16.04 Nvidia 361.42 black screen + cannot remove /var/lib/dpkg/lock: Read-only

  1. #1
    Join Date
    Nov 2016
    Beans
    2

    Exclamation Ubuntu 16.04 Nvidia 361.42 black screen + cannot remove /var/lib/dpkg/lock: Read-only

    Hi,

    there are some Q&A about this in the internet, but I haven't been able to solve the problem so far, maybe cause I'm new to Linux.

    I had problems with update / upgrade which always got stuck on the same line:



    Yesterday after switching my lap on I got a login page and then black screen with cursor.
    I tried different solutions, but nothing worked. I have a Win10/Ubuntu dual boot, so I switched to Ubuntu advanced options and chose 'root - root to shell prompt' and tried some commands. Every time I get the same problem:



    Code:
    sudo rm /var/lib/dpkg/lock
    didn't work, I got:
    Code:
    cannot remove /var/lib/dpkg/lock: Read-only file
    Please help - I can't work without Ubuntu and I have many files there :/

  2. #2
    Join Date
    Oct 2006
    Beans
    58,286

    Re: Ubuntu 16.04 Nvidia 361.42 black screen + cannot remove /var/lib/dpkg/lock: Read-

    Quote Originally Posted by agnik View Post
    Code:
    cannot remove /var/lib/dpkg/lock: Read-only file
    Once in the recovery shell try..

    Code:
    sudo mount -o remount,rw /
    Then try your commands again.

  3. #3
    Join Date
    Apr 2012
    Beans
    Hidden!

    Re: Ubuntu 16.04 Nvidia 361.42 black screen + cannot remove /var/lib/dpkg/lock: Read-

    Please also try..
    Code:
    sudo rm -rf /var/lib/dpkg/lock
    sudo dpkg --configure -a
    thanks.
    Craving anchovy, herring and squid pizza.....with clam sauce

  4. #4
    Join Date
    Nov 2016
    Beans
    2

    Re: Ubuntu 16.04 Nvidia 361.42 black screen + cannot remove /var/lib/dpkg/lock: Read-

    Omg thank you very much, after running commands you suggested my Ubuntu is alive again )))) Yeah!!!! I'm writing from Ubuntu now )
    But I don't know what do to next. I mean I don't want to get into such problem again. What to do with Nvidia? I'm afraid of update and upgrade now.

  5. #5
    Join Date
    Apr 2012
    Beans
    Hidden!

    Re: Ubuntu 16.04 Nvidia 361.42 black screen + cannot remove /var/lib/dpkg/lock: Read-

    Hi, it should be ok now to run the commands, just do not do it with a root prompt #root
    Bring up a regular terminal with keypress "ctrl/alt/t" then do..
    Code:
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get autoremove
     sudo apt-get autoclean
    Thanks.
    Craving anchovy, herring and squid pizza.....with clam sauce

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •