/etc/apt/sources.list

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

/etc/apt/sources.list

Post by WarHawk »

What is the correct /etc/apt/sources.list supposed to be?

I borked my apt-get update I think

mine currently shows

Code: Select all

# cat /etc/apt/sources.list
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
deb http://deb.debian.org/debian-security/ stretch-updates main contrib non-free
deb http://deb.debian.org/debian/ stretch-backports main contrib non-free
The reason I am asking is I keep getting this error

Code: Select all

E: Unable to parse package file /var/lib/dpkg/status (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: /etc/apt/sources.list

Post by Fourdee »

sources fine, see below:

Code: Select all

deb http://ftp.debian.org/debian/ stretch main contrib non-free
deb http://ftp.debian.org/debian/ stretch-updates main contrib non-free
deb https://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://ftp.debian.org/debian/ stretch-backports main contrib non-free
Issue with with the corrupt cache, try purging it:

Code: Select all

apt-get clean
rm -R /var/lib/apt/lists/* -vf 
Then update APT again.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: /etc/apt/sources.list

Post by WarHawk »

Mine is a custom build of Dietpi from armbian stretch image for Orange Pi Zero...I ran the upgrade from 6.6 to 6.7...
No worries on helping/troubleshooting (I know non-standard build problems and trying to troubleshoot are almost impossible)...if worse comes to worse I will just rebuild from scratch with the 6.7 as default DIEPI_PREP build

Code: Select all

# apt-get update
Get:1 http://deb.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://ftp.debian.org/debian stretch InRelease
Get:3 http://ftp.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://apt.armbian.com stretch InRelease [18.2 kB]
Get:5 http://ftp.debian.org/debian stretch-backports InRelease [91.8 kB]
Get:6 http://ftp.debian.org/debian stretch Release [118 kB]
Get:7 http://ftp.debian.org/debian stretch Release.gpg [2,434 B]
Get:8 http://deb.debian.org/debian-security stretch/updates/main armhf Packages                                                                                                                                                              [360 kB]
Get:9 http://deb.debian.org/debian-security stretch/updates/main Translation-en                                                                                                                                                              [165 kB]
Get:10 http://deb.debian.org/debian-security stretch/updates/contrib armhf Packa                                                                                                                                                             ges [1,784 B]
Get:11 http://apt.armbian.com stretch/main armhf Packages [211 kB]
Get:12 http://deb.debian.org/debian-security stretch/updates/contrib Translation                                                                                                                                                             -en [1,759 B]
Get:13 http://deb.debian.org/debian-security stretch/updates/non-free armhf Pack                                                                                                                                                             ages [1,268 B]
Get:14 http://deb.debian.org/debian-security stretch/updates/non-free Translatio                                                                                                                                                             n-en [481 B]
Get:15 http://ftp.debian.org/debian stretch-updates/main armhf Packages [10.9 kB                                                                                                                                                             ]
Get:16 http://ftp.debian.org/debian stretch-updates/main Translation-en [6,782 B                                                                                                                                                             ]
Get:17 http://apt.armbian.com stretch/stretch-utils armhf Packages [4,743 B]
Get:18 http://apt.armbian.com stretch/stretch-desktop armhf Packages [1,543 B]
Get:19 http://ftp.debian.org/debian stretch-backports/main armhf Packages [298 k                                                                                                                                                             B]
Get:20 http://ftp.debian.org/debian stretch-backports/main Translation-en [226 k                                                                                                                                                             B]
Get:21 http://ftp.debian.org/debian stretch-backports/contrib armhf Packages [5,                                                                                                                                                             700 B]
Get:22 http://ftp.debian.org/debian stretch-backports/contrib Translation-en [5,                                                                                                                                                             877 B]
Get:23 http://ftp.debian.org/debian stretch-backports/non-free armhf Packages [4                                                                                                                                                             ,884 B]
Get:24 http://ftp.debian.org/debian stretch-backports/non-free Translation-en [2                                                                                                                                                             4.1 kB]
Get:25 http://ftp.debian.org/debian stretch/main armhf Packages [6,950 kB]
Get:26 http://ftp.debian.org/debian stretch/main Translation-en [5,394 kB]
Get:27 http://ftp.debian.org/debian stretch/contrib armhf Packages [42.0 kB]
Get:28 http://ftp.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Get:29 http://ftp.debian.org/debian stretch/non-free armhf Packages [59.6 kB]
Get:30 http://ftp.debian.org/debian stretch/non-free Translation-en [80.1 kB]
Fetched 14.3 MB in 50s (283 kB/s)
Reading package lists... Error!
E: Unable to parse package file /var/lib/dpkg/status (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: /etc/apt/sources.list

Post by MichaIng »

@WarHawk
Please try to comment the armbian repo, as your Debian repos look fine. The related file should be located within /etc/apt/sources.list.d/. Comment out the deb line(s) inside and try if apt update runs through then, in case after doing the clean steps provided by Fourdee.

If it doesn't help, I see you switched from default repo mirrordirector (deb.debian.org) to ftp.debian.org already. The security repo is not affected by this, as different mirrors have it available via different URL scheme or not at all. Please try to adjust the remaining deb.debian.org line within /etc/apt/sources.list and replace by:

Code: Select all

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: /etc/apt/sources.list

Post by WarHawk »

Thanks!

Will give it a shot asap
Post Reply