缺少Raspberry Pi etc / apt / sources.list

时间:2016-12-03 05:09:45

标签: linux raspberry-pi raspbian raspberry-pi2

我可能偶然删除了etc / apt / sources.list,现在每当我尝试在Raspberry Pi上安装一些东西时,我都会收到以下错误消息

包phpmyadmin不可用,但由另一个包引用。 这可能意味着包裹丢失,已经过时或者 只能从其他来源获得

E:包'phpmyadmin'没有安装候选者

如何获取/etc/apt/sources.list文件

1 个答案:

答案 0 :(得分:0)

Raspbian Jessie Lite的标准/etc/apt/sources.list看起来像这样:

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

我认为phpmyadmin不需要其他条目。

此外还有一个文件/etc/apt/sources.list.d/raspi.list,如下所示:

deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui

以下是/ etc / apt包含文件权限设置中所有文件的完整列表。我没有包含空目录。

pi@raspberrypi:~ $ ls -alR /etc/apt
/etc/apt:
total 40
drwxr-xr-x  6 root root 4096 Nov 25 17:28 .
drwxr-xr-x 88 root root 4096 Dec 16 20:25 ..
drwxr-xr-x  2 root root 4096 Dec 16 20:10 apt.conf.d
-rw-r--r--  1 root root   99 Nov 25 17:28 listchanges.conf
drwxr-xr-x  2 root root 4096 Apr  2  2016 preferences.d
-rw-r--r--  1 root root  234 Nov 25 17:22 sources.list
drwxr-xr-x  2 root root 4096 Nov 25 17:55 sources.list.d
-rw-r--r--  1 root root 2424 Nov 25 17:22 trusted.gpg
-rw-r--r--  1 root root 1233 Nov 25 17:22 trusted.gpg~
drwxr-xr-x  2 root root 4096 Apr  2  2016 trusted.gpg.d

/etc/apt/apt.conf.d:
total 28
drwxr-xr-x 2 root root 4096 Dec 16 20:10 .
drwxr-xr-x 6 root root 4096 Nov 25 17:28 ..
-rw-r--r-- 1 root root  643 Apr  2  2016 01autoremove
-rw-r--r-- 1 root root  981 Nov 25 17:24 01autoremove-kernels
-rw-r--r-- 1 root root  141 Oct 12  2014 20listchanges
-rw-r--r-- 1 root root  161 Nov 25 17:30 50raspi
-rw-r--r-- 1 root root  182 Mar 19  2015 70debconf

/etc/apt/sources.list.d:
total 12
drwxr-xr-x 2 root root 4096 Nov 25 17:55 .
drwxr-xr-x 6 root root 4096 Nov 25 17:28 ..
-rw-r--r-- 1 root root  193 Nov 25 17:55 raspi.list