I am having trouble updating Linux Mint -- Can anybody help?

in #linux6 years ago (edited)

linux mint help

Screenshot from 2018-08-28 13-54-43.png

I am trouble having trouble updating my linux mint using the following command :

  mint@mint ~ $ apt-get update
 Reading package lists... Done
 W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
 E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
 E: Unable to lock directory /var/lib/apt/lists/
 W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
 W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

Please Help!

https://unix.stackexchange.com/q/464867/304589
Also found a link for linux users trying to #mine @liffip and @profitgennerator
https://steemit.com/security/@profitgenerator/linux-users-in-danger-secure-your-pc-immediately
https://steemkr.com/mining/@lifipp/tutorial-or-auto-update-and-auto-start-scripts-for-mining-rigs-running-on-linux

Sort:  

Is this a live OS?
or have you installed mint on a system?

If you have installed make sure you are a sudoer, normally sudoers are set during installation in ubuntu based distros.

If you are a sudoer (i.e. you have gone through the standard installation process to create the user mint) then use the command,

sudo apt update && sudo apt upgrade

Yes like a dummy i installed it on hard disk and now I am stuck with a computer I can't update.

  sudo apt update && sudo apt upgrade
 [sudo] password for jesuscoins: 
  E: Type '**' is not known on line 1 in source list /etc/apt/sources.list
  E: The list of sources could not be read.

This is what it printed out after trying ..

can you send the output of command

cat /etc/apt/sources.list

Well it just printed out a bunch of encryption which was too large to put into this text,, but this is what it says at the end,

    deb cdrom:[Linux Mint 18.3 _Sylvia_ - Release amd64 20171124]/ xenial contrib main non-free
PCME ~ # sudo apt update && sudo apt upgrade

E: Type '**' is not known on line 1 in source list /etc/apt/sources.list
E: The list of sources could not be read.

I cannot update or uprgade OS at all.

The /etc/apt/sources.list file should only contain lines starting with # deb cdrom:[ but in your case this line is the last line and all entry before this line is some random stuff. That is why the error says line E: Type '**' is not known on line 1 in source list /etc/apt/sources.list (note: line 1).

So lets try to clean up the unwanted stuff and put the last line to the line 1.

  1. switch to root sudo -s
  2. make a copy of /etc/apt/sources.list
    cp /etc/apt/sources.list /etc/apt/sources.list_backup
    
  3. edit sources.list
    echo "#deb cdrom:[Linux Mint 18.3 _Sylvia_ - Release amd64 20171124]/ xenial contrib main non-free" > /etc/apt/sources.list
    
  4. update the system
    apt update && apt upgrade
    

Wow thank you so much!!! this worked and I am extremely relieved! You're the best @bitbase

We should not give up on anything

I agree! Oh, should I run updates under root or not..?

Don't use root. Keep with sudo. Use root only if it is very compulsary and you have no other way of doing it (Like we edit the sources.list file).

So this is what I got.. a few err messages with it.

apt update && apt upgrade

Err:1 http://packages.domain.com xenial InRelease
Could not connect to packages.domain.com:80 (127.0.0.1). - connect (111: Connection refused)
Ign:2 http://mirrors.evowise.com/linuxmint/packages sylvia InRelease
Hit:3 http://mirrors.evowise.com/linuxmint/packages sylvia Release
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:5 http://archive.canonical.com/ubuntu xenial InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:9 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 216 kB in 1s (134 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://packages.domain.com/dists/xenial/InRelease Could not connect to packages.domain.com:80 (127.0.0.1). - connect (111: Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Can you check if this still shows error?

Also give me the output of cat /etc/apt/apt.conf

 jesuscoins@PCME ~ $ cat /etc/apt/apt.conf
 cat: /etc/apt/apt.conf: No such file or directory
 jesuscoins@PCME ~ $ clear
 jesuscoins@PCME ~ $ sudo -s
 [sudo] password for jesuscoins: 
 PCME ~ # cat /etc/apt/apt.conf
 cat: /etc/apt/apt.conf: No such file or directory

I can't figure out what the problem is. Keep me posted on any other problem you have about Linux, because it also help me develop my skills.

I'll try to find the source of this error and update you.

you are most welcome

So this is what it says.

jesuscoins@PCME ~ $ sudo -s

[sudo] password for jesuscoins: 

PCME ~ # 

Coin Marketplace

STEEM 0.16
TRX 0.16
JST 0.030
BTC 59527.28
ETH 2462.24
USDT 1.00
SBD 2.49