2

When I try to update package list on my DigitalOcean VPS with the command:

aran@Aran:~$ sudo apt-get update
Ign http://mirrors.digitalocean.com trusty InRelease
Hit http://mirrors.digitalocean.com trusty-updates InRelease
Hit http://mirrors.digitalocean.com trusty-backports InRelease
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://mirrors.digitalocean.com trusty Release.gpg
Hit http://mirrors.digitalocean.com trusty Release
Hit http://mirrors.digitalocean.com trusty-updates/main Sources
Hit http://mirrors.digitalocean.com trusty-updates/restricted Sources
Hit http://mirrors.digitalocean.com trusty-updates/universe Sources
Hit http://mirrors.digitalocean.com trusty-updates/multiverse Sources
Hit http://mirrors.digitalocean.com trusty-updates/main amd64 Packages
Hit http://mirrors.digitalocean.com trusty-updates/restricted amd64 Packages
Hit http://mirrors.digitalocean.com trusty-updates/universe amd64 Packages
Hit http://mirrors.digitalocean.com trusty-updates/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com trusty-updates/main i386 Packages
Hit http://mirrors.digitalocean.com trusty-updates/restricted i386 Packages
Hit http://mirrors.digitalocean.com trusty-updates/universe i386 Packages
Hit http://mirrors.digitalocean.com trusty-updates/multiverse i386 Packages
Hit http://mirrors.digitalocean.com trusty-updates/main Translation-en
Hit http://mirrors.digitalocean.com trusty-updates/multiverse Translation-en
Hit http://mirrors.digitalocean.com trusty-updates/restricted Translation-en
Hit http://mirrors.digitalocean.com trusty-updates/universe Translation-en
Hit http://mirrors.digitalocean.com trusty-backports/main Sources
Hit http://mirrors.digitalocean.com trusty-backports/restricted Sources
Hit http://mirrors.digitalocean.com trusty-backports/universe Sources
Hit http://mirrors.digitalocean.com trusty-backports/multiverse Sources
Hit http://mirrors.digitalocean.com trusty-backports/main amd64 Packages
Hit http://mirrors.digitalocean.com trusty-backports/restricted amd64 Packages
Hit http://mirrors.digitalocean.com trusty-backports/universe amd64 Packages
Hit http://mirrors.digitalocean.com trusty-backports/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com trusty-backports/main i386 Packages
Hit http://mirrors.digitalocean.com trusty-backports/restricted i386 Packages
Hit http://mirrors.digitalocean.com trusty-backports/universe i386 Packages
Hit http://mirrors.digitalocean.com trusty-backports/multiverse i386 Packages
Hit http://mirrors.digitalocean.com trusty-backports/main Translation-en
Hit http://mirrors.digitalocean.com trusty-backports/multiverse Translation-en
Hit http://mirrors.digitalocean.com trusty-backports/restricted Translation-en
Hit http://mirrors.digitalocean.com trusty-backports/universe Translation-en
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://mirrors.digitalocean.com trusty/main Sources
Hit http://mirrors.digitalocean.com trusty/restricted Sources
Hit http://mirrors.digitalocean.com trusty/universe Sources
Hit http://mirrors.digitalocean.com trusty/multiverse Sources
Hit http://mirrors.digitalocean.com trusty/main amd64 Packages
Hit http://mirrors.digitalocean.com trusty/restricted amd64 Packages
Hit http://mirrors.digitalocean.com trusty/universe amd64 Packages
Hit http://mirrors.digitalocean.com trusty/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://mirrors.digitalocean.com trusty/main i386 Packages
Hit http://mirrors.digitalocean.com trusty/restricted i386 Packages
Hit http://mirrors.digitalocean.com trusty/universe i386 Packages
Hit http://mirrors.digitalocean.com trusty/multiverse i386 Packages
Hit http://mirrors.digitalocean.com trusty/main Translation-en
Hit http://mirrors.digitalocean.com trusty/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://mirrors.digitalocean.com trusty/restricted Translation-en
Hit http://mirrors.digitalocean.com trusty/universe Translation-en
Ign http://mirrors.digitalocean.com trusty/main Translation-en_US
Ign http://mirrors.digitalocean.com trusty/multiverse Translation-en_US
Ign http://mirrors.digitalocean.com trusty/restricted Translation-en_US
Ign http://mirrors.digitalocean.com trusty/universe Translation-en_US
Reading package lists... Error!

Here are the content of sources.list:

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
#

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.digitalocean.com/ubuntu trusty main restricted
deb-src http://mirrors.digitalocean.com/ubuntu trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.digitalocean.com/ubuntu trusty-updates main restricted
deb-src http://mirrors.digitalocean.com/ubuntu trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.digitalocean.com/ubuntu trusty universe
deb-src http://mirrors.digitalocean.com/ubuntu trusty universe
deb http://mirrors.digitalocean.com/ubuntu trusty-updates universe
deb-src http://mirrors.digitalocean.com/ubuntu trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.digitalocean.com/ubuntu trusty multiverse
deb-src http://mirrors.digitalocean.com/ubuntu trusty multiverse
deb http://mirrors.digitalocean.com/ubuntu trusty-updates multiverse
deb-src http://mirrors.digitalocean.com/ubuntu trusty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.digitalocean.com/ubuntu trusty-backports main restricted universe multive$
deb-src http://mirrors.digitalocean.com/ubuntu trusty-backports main restricted universe mul$

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

deb http://security.ubuntu.com/ubuntu trusty-security main
deb-src http://security.ubuntu.com/ubuntu trusty-security main
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
# deb http://security.ubuntu.com/ubuntu trusty-security multiverse
# deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

And here are the things in /var/log/apt/term.log:

Log started: 2017-05-29  01:21:39
Selecting previously unselected package libxslt1.1:amd64.
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading databa$
Preparing to unpack .../libxslt1.1_1.1.28-2ubuntu0.1_amd64.deb ...
Unpacking libxslt1.1:amd64 (1.1.28-2ubuntu0.1) ...
Selecting previously unselected package nginx-common.
Preparing to unpack .../nginx-common_1.4.6-1ubuntu3.7_all.deb ...
Unpacking nginx-common (1.4.6-1ubuntu3.7) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../nginx-core_1.4.6-1ubuntu3.7_amd64.deb ...
Unpacking nginx-core (1.4.6-1ubuntu3.7) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.4.6-1ubuntu3.7_all.deb ...
Unpacking nginx (1.4.6-1ubuntu3.7) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libxslt1.1:amd64 (1.1.28-2ubuntu0.1) ...
Setting up nginx-common (1.4.6-1ubuntu3.7) ...
Setting up nginx-core (1.4.6-1ubuntu3.7) ...
Setting up nginx (1.4.6-1ubuntu3.7) ...
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...
Log ended: 2017-05-29  01:21:44

Log started: 2017-05-29  01:22:35
Selecting previously unselected package php5-fpm.
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading databa$
Preparing to unpack .../php5-fpm_5.5.9+dfsg-1ubuntu4.21_amd64.deb ...
Unpacking php5-fpm (5.5.9+dfsg-1ubuntu4.21) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up php5-fpm (5.5.9+dfsg-1ubuntu4.21) ...

Creating config file /etc/php5/fpm/php.ini with new version
php5_invoke: Enable module json for fpm SAPI
php5_invoke: Enable module gd for fpm SAPI
php5_invoke: Enable module mysqli for fpm SAPI
php5_invoke: Enable module pdo_mysql for fpm SAPI
php5_invoke: Enable module pdo for fpm SAPI
php5_invoke: Enable module opcache for fpm SAPI
php5_invoke: Enable module ssh2 for fpm SAPI
php5_invoke: Enable module readline for fpm SAPI
php5_invoke: Enable module mysql for fpm SAPI
php5-fpm start/running, process 7326
Processing triggers for ureadahead (0.100.0-16) ...
Log ended: 2017-05-29  01:22:37

Here are the logs in history.log in the same directory:

Start-Date: 2017-05-29  01:21:39
Commandline: apt-get install nginx
Install: nginx-core:amd64 (1.4.6-1ubuntu3.7, automatic), libxslt1.1:amd64 (1.1.28-2ubuntu0.1$
End-Date: 2017-05-29  01:21:44

Start-Date: 2017-05-29  01:22:35
Commandline: apt-get install php5-fpm
Install: php5-fpm:amd64 (5.5.9+dfsg-1ubuntu4.21)
End-Date: 2017-05-29  01:22:37
  • 2
    Please edit your question to include the contents of the file /etc/apt/sources.list and the files in /etc/apt/sources.list.d, if any. – Melebius May 29 '17 at 10:31
  • i included the first but the files in the other one were empty – yukashima huksay May 29 '17 at 12:03
  • If you are using VPS from DigitalOcean and haven’t touched /etc/apt/sources.list yourself, you should contact their support since this becomes looking like a vendor-specific problem. – Melebius May 29 '17 at 12:23
  • I don't remember maybe I have. I'm using a fake address on DO, will it lead to any problem if I call for support? – yukashima huksay May 30 '17 at 20:08
  • What does it mean “a fake address”? Please add all details to your question, it may be an important circumstance of your problem. – Melebius May 31 '17 at 6:12
3

I contacted DO support, this is their replay:

Hi there,

Thanks for reaching out! Is "Reading package lists... Error!" the only error you see? Normally there'll be another line or two of output that gives a bit more detail about what's happening and can help narrow down the issue.

One possible cause, though, is apt being in an inconsistent state. If you run the following to clear out some locally cached data, then try updating again, does it work then?

sudo mv /var/lib/apt/lists /var/lib/apt/lists.old  
sudo apt-get clean 
sudo apt-get update 

Let us know if that works or we can help with anything else!

Regards,

Nicholas C. Platform Support Advocate Thanks for your feedback!

I Think i had mistakenly moved or deleted smth! Because this is what I got:

aran@Aran:~$ sudo mv /var/lib/apt/lists /var/lib/apt/lists.old
mv: cannot stat ‘/var/lib/apt/lists’: No such file or directory

Anyway my problem is now fixed after the clean command.

2

If you go to http://mirrors.digitalocean.com/ it says

This mirror is intended for use of DigitalOcean Droplets.

and

This mirror is intended to assist in the upgrade of DigitalOcean Droplets running legacy End-of-Life versions of Ubuntu .

Unless you are using this mirror specifically, for a particular purpose, you should change your Repository.

  • how can I do that? I don't understand! i'm kinda new to unix!:-" – yukashima huksay May 29 '17 at 11:56
  • if it helps I'm running that command on a DO VPS i'm not trying to use any specific mirror explicitly! i just ran the commands. – yukashima huksay May 29 '17 at 12:05

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.