0

I installed Ubuntu 16.04 just a couple of weeks back. Recently I started seeing a red error button on my notification shade on the top right saying

An error occurred, please run package manager from the right click menu or apt-get in a terminal to see what is wrong.

The error message was:

Error opening the cache (E: type sudo is not known on line 55 source
list/etc.apt/sources.list,E: The list of sources could not be read).
This usually means your installed packages have unmet dependencies

How can I solve this?

I tried the suggested commands "ls -l /usr/bin/sudo" ,"sudo apt-get install -f" and "sudo dpkg --confiure -a" as suggested .So here is my terminal output to the commands in form of this terminal screenshot. Please check the attached screenshot and help me further. terminal 1

  • Could you please edit your question to include the full, verbatim output of ls -l /usr/bin/sudo and sudo apt-get install -f? Thanks. – David Foerster Aug 26 '17 at 8:15
  • Please run sudo dpkg --confiure -a from terminal and lets see the output. Please copy the output and paste it into your question by adding after clicking the edit button – George Udosen Aug 26 '17 at 14:12
  • I have attached the result to the above commands – rohit choudhary Aug 28 '17 at 14:35
0

Based on the sources.list, you have to remove the bottom three lines in that file. Then run sudo apt-get update && sudo apt-get -f install

You can edit it using gksudo gedit /etc/apt/sources.list - and just remove the bottom three lines (starting with sudo ...) and save the file again. Then run commands as above.

0

I tried the following steps you have mentioned above but have found no luck with success on that.Still returns with the same line 55 error in the source.list .Here is an attached screenshot of the terminal window.Have a look at it -

error while installation via command window

Here is my sources.list attached please check it out

sources.list

  • Please include the content of /etc/apt/sources.list – vidarlo Aug 26 '17 at 9:14
  • @vidarlo I have attached my content of /etc/apt/sources.list .Please check it out .I haven't been able to install anything via the command line all this time – rohit choudhary Sep 2 '17 at 5:08
-1

Okay follow these steps to fix it:

  1. On keyboard type Ctrl+Alt+t
  2. In the terminal that opens type:

    sudo apt-get update
    
  3. Enter your password when asked, please note as you enter you won't see it in the terminal (that's the Linux way).
  4. Now let it run till, after that type again in the terminal:

    sudo apt-get upgrade
    
  5. Repeat step 3

ALTERNATIVELY:

  1. Click on dash or Super key (on your keyboard) and type terminal

    enter image description here

  2. Click on ther terminal application
  3. In the terminal that opens type:

    sudo apt-get update
    
  4. Enter your password when asked, please note as you enter you won't see it in the terminal (that's the Linux way).
  5. Now let it run till, after that type again in the terminal:

    sudo apt-get upgrade
    
  6. Repeat step 4

If the red icon remains just ignore till reboot or reboot.

  • I was recommended the same by my friend but this hasnt helped me – rohit choudhary Aug 26 '17 at 9:16

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.