I can not install any app-get packages !

May 21, 2016 1.2k views
Linux Basics

I have Only MySQL server run on ubuntu and when tried install unzip package
This error shown Segmentation fault (core dumped) and when tried update sudo apt-get update Show

Fetched 5395 kB in 10s (494 kB/s)                                              
Reading package lists... Error!
3 Answers

Is their anything after the Error?


sudo apt-get clean
sudo apt-get update

See if that makes a difference.

If not copy the entire error message.

  • Hi , thank you for your reply here is my result

    root@my-server:~# sudo apt-get clean
    root@my-server:~# sudo apt-get update
    Hit http://repo.mysql.com trusty InRelease
    Ign http://mirrors.digitalocean.com trusty InRelease   
    Hit http://mirrors.digitalocean.com trusty-updates InRelease 
    Ign http://repo.mysql.com trusty/mysql-5.7 Translation-en          
    Ign http://repo.mysql.com trusty/mysql-apt-config Translation-en
    Reading package lists... Error!   
    • Try the following :

      sudo rm /var/lib/apt/lists/* -vf
      sudo apt-get update

      The first line deletes all the package lists.Apt-get downloads these to check if their is any updates.

      Apt-Get checks the repos to see if it has a up-to-date package list from them if not it will download it so this is forcing it to download them all again in case of an error.

      let me know if their is any change to the error or if it goes away.

      • Thank you s0litaire ,

        It works now after run sudo apt-get clean and restart the server

I got this one also, the reason was because there's no enough memory. So try to add swap memory like this

sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

and don't forget to turn it off when you are done

sudo swapoff /swapfile
Have another answer? Share your knowledge.