哪位愿意分享一下自己的/etc/apt/source.list

2018-11-07 08:51:22 +08:00
 z0z

我的 source.list 都不管用了,apt-get -f install 也不会自动安装依赖了。

主要是我不知道自己干了什么啊。

见谅,当一回伸手党。

3126 次点击
所在节点    问与答
11 条回复
z0z
2018-11-07 08:52:52 +08:00
ubuntu16.04 LTS
z0z
2018-11-07 08:55:15 +08:00
现在是这个鸟样:

z0z@z0z:~/work/vimicro/trunk/build/scripts$ source /etc/apt/sources.list
No command 'deb' found, did you mean:
Command 'derb' from package 'icu-devtools' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'dex' from package 'dex' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'debc' from package 'devscripts' (main)
Command 'xdeb' from package 'xdeb' (universe)
Command 'deb3' from package 'quilt' (universe)
Command 'dub' from package 'dub' (universe)
deb: command not found
No command 'deb' found, did you mean:
Command 'debc' from package 'devscripts' (main)
Command 'derb' from package 'icu-devtools' (main)
Command 'debi' from package 'devscripts' (main)
Command 'dex' from package 'dex' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'dub' from package 'dub' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'deb3' from package 'quilt' (universe)
deb: command not found
No command 'deb' found, did you mean:
Command 'dex' from package 'dex' (universe)
Command 'dub' from package 'dub' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'debc' from package 'devscripts' (main)
Command 'deb3' from package 'quilt' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'derb' from package 'icu-devtools' (main)
deb: command not found
No command 'deb' found, did you mean:
Command 'dex' from package 'dex' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'derb' from package 'icu-devtools' (main)
Command 'dub' from package 'dub' (universe)
Command 'debc' from package 'devscripts' (main)
Command 'deb3' from package 'quilt' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'debi' from package 'devscripts' (main)
deb: command not found
No command 'deb' found, did you mean:
Command 'dub' from package 'dub' (universe)
Command 'dex' from package 'dex' (universe)
Command 'deb3' from package 'quilt' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'derb' from package 'icu-devtools' (main)
Command 'debi' from package 'devscripts' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'debc' from package 'devscripts' (main)
deb: command not found
No command 'deb' found, did you mean:
Command 'debc' from package 'devscripts' (main)
Command 'dub' from package 'dub' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'dex' from package 'dex' (universe)
Command 'deb3' from package 'quilt' (universe)
Command 'derb' from package 'icu-devtools' (main)
deb: command not found
No command 'deb' found, did you mean:
Command 'dub' from package 'dub' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'deb3' from package 'quilt' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'dex' from package 'dex' (universe)
Command 'debc' from package 'devscripts' (main)
Command 'derb' from package 'icu-devtools' (main)
Command 'dab' from package 'bsdgames' (universe)
deb: command not found
No command 'deb' found, did you mean:
Command 'dab' from package 'bsdgames' (universe)
Command 'dex' from package 'dex' (universe)
Command 'dub' from package 'dub' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'deb3' from package 'quilt' (universe)
Command 'debc' from package 'devscripts' (main)
Command 'derb' from package 'icu-devtools' (main)
deb: command not found
No command 'deb' found, did you mean:
Command 'dex' from package 'dex' (universe)
Command 'xdeb' from package 'xdeb' (universe)
Command 'deb3' from package 'quilt' (universe)
Command 'derb' from package 'icu-devtools' (main)
Command 'debi' from package 'devscripts' (main)
Command 'debc' from package 'devscripts' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'dub' from package 'dub' (universe)
deb: command not found
No command 'deb' found, did you mean:
Command 'deb3' from package 'quilt' (universe)
Command 'debi' from package 'devscripts' (main)
Command 'debc' from package 'devscripts' (main)
Command 'xdeb' from package 'xdeb' (universe)
Command 'dub' from package 'dub' (universe)
Command 'derb' from package 'icu-devtools' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'dex' from package 'dex' (universe)
deb: command not found
lonccc
2018-11-07 08:56:42 +08:00
z0z
2018-11-07 09:35:20 +08:00
解决了,之前一直是下面这样的提示,然后我就去搜为啥安装包时不会解决自动依赖了。有人说是源的问题,于是就开始折腾源,多谢楼上的 @loncc 提供了清华的源,我更改后没起作用,提示依旧,此时意识到可能不是源的问题,只好又把 source.list 换成了系统默认的。

z0z@z0z:/etc$ sudo apt-get install subversion
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
subversion : Depends: libsvn1 (= 1.9.3-2ubuntu1.1) but it is not going to be installed
Depends: libapr1 (>= 1.5.0) but it is not going to be installed
Depends: libaprutil1 (>= 1.3.2+dfsg) but it is not going to be installed
teamviewer : Depends: libqt5x11extras5 (>= 5.2) but it is not going to be installed
Depends: qtdeclarative5-controls-plugin (>= 5.2) but it is not going to be installed or
qml-module-qtquick-controls (>= 5.2) but it is not going to be installed
Depends: qtdeclarative5-dialogs-plugin (>= 5.2) but it is not going to be installed or
qml-module-qtquick-dialogs (>= 5.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
z0z@z0z/etc$ sudo apt-get -f install subversion

于是搜 The following packages have unmet dependencies,找到了
https://blog.csdn.net/jinguangliu/article/details/78145423
捡关键的说,就是 sudo apt --fix-broken install 这句起了作用

z0z@z0z:/etc$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.13.0-36 linux-headers-4.13.0-36-generic linux-image-4.13.0-36-generic linux-image-extra-4.13.0-36-generic linux-signed-image-4.13.0-36-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libqt5x11extras5 qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets qtdeclarative5-controls-plugin qtdeclarative5-dialogs-plugin
The following NEW packages will be installed:
libqt5x11extras5 qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets qtdeclarative5-controls-plugin qtdeclarative5-dialogs-plugin
0 upgraded, 6 newly installed, 0 to remove and 392 not upgraded.
1 not fully installed or removed.
Need to get 787 kB of archives.
After this operation, 3,511 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 libqt5x11extras5 amd64 5.5.1-3build1 [7,876 B]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 qml-module-qtquick-controls amd64 5.5.1-1ubuntu1 [643 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 qtdeclarative5-controls-plugin all 5.5.1-1ubuntu1 [4,032 B]
Get:4 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 qml-module-qtquick-privatewidgets amd64 5.5.1-1ubuntu1 [38.9 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 qml-module-qtquick-dialogs amd64 5.5.1-1ubuntu1 [89.0 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 qtdeclarative5-dialogs-plugin amd64 5.5.1-1ubuntu1 [4,044 B]
Fetched 787 kB in 2s (350 kB/s)
Selecting previously unselected package libqt5x11extras5:amd64.
(Reading database ... 290837 files and directories currently installed.)
Preparing to unpack .../libqt5x11extras5_5.5.1-3build1_amd64.deb ...
Unpacking libqt5x11extras5:amd64 (5.5.1-3build1) ...
Selecting previously unselected package qml-module-qtquick-controls:amd64.
Preparing to unpack .../qml-module-qtquick-controls_5.5.1-1ubuntu1_amd64.deb ...
Unpacking qml-module-qtquick-controls:amd64 (5.5.1-1ubuntu1) ...
Selecting previously unselected package qtdeclarative5-controls-plugin.
Preparing to unpack .../qtdeclarative5-controls-plugin_5.5.1-1ubuntu1_all.deb ...
Unpacking qtdeclarative5-controls-plugin (5.5.1-1ubuntu1) ...
Selecting previously unselected package qml-module-qtquick-privatewidgets:amd64.
Preparing to unpack .../qml-module-qtquick-privatewidgets_5.5.1-1ubuntu1_amd64.deb ...
Unpacking qml-module-qtquick-privatewidgets:amd64 (5.5.1-1ubuntu1) ...
Selecting previously unselected package qml-module-qtquick-dialogs:amd64.
Preparing to unpack .../qml-module-qtquick-dialogs_5.5.1-1ubuntu1_amd64.deb ...
Unpacking qml-module-qtquick-dialogs:amd64 (5.5.1-1ubuntu1) ...
Selecting previously unselected package qtdeclarative5-dialogs-plugin:amd64.
Preparing to unpack .../qtdeclarative5-dialogs-plugin_5.5.1-1ubuntu1_amd64.deb ...
Unpacking qtdeclarative5-dialogs-plugin:amd64 (5.5.1-1ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libqt5x11extras5:amd64 (5.5.1-3build1) ...
Setting up qml-module-qtquick-controls:amd64 (5.5.1-1ubuntu1) ...
Setting up qtdeclarative5-controls-plugin (5.5.1-1ubuntu1) ...
Setting up qml-module-qtquick-privatewidgets:amd64 (5.5.1-1ubuntu1) ...
Setting up qml-module-qtquick-dialogs:amd64 (5.5.1-1ubuntu1) ...
Setting up qtdeclarative5-dialogs-plugin:amd64 (5.5.1-1ubuntu1) ...
Setting up teamviewer (13.2.26559) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...


此时正在欢快地执行 sudo apt-get upgrade....
heimeil
2018-11-07 09:42:29 +08:00
哥哥,source 是用来更新 shell 环境变量的,sources.list 是 apt 的配置文件,用#3 的镜像源改了 sources.list 再用 sudo apt update 更新缓存,用国内的源会快很多,另外注意 Ubuntu 版本。
z0z
2018-11-07 09:49:57 +08:00
@heimeil 我是不是被 https://blog.csdn.net/swiftfake/article/details/79098345 里面的 source 用法误导了
ooeyunarika
2018-11-07 11:12:34 +08:00
@z0z

这 blog 写的是个什么玩意儿.....建议 lz 查一下 source 这个命令是用来做什么的...

source is a bash shell built-in command that executes the content of the file passed as argument, in the current shell. It has a synonym in . (period).
z0z
2018-11-07 11:37:24 +08:00
@ooeyunarika 是的,现在基本明白 source 是干嘛的了。
mingl0280
2018-11-07 13:05:08 +08:00
#-----------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http://sources.***.*****.***/ub xenial main restricted universe multiverse
deb-src http://sources.***.*****.***/ub xenial main restricted universe multiverse

###### Ubuntu Update Repos
deb http://sources.***.*****.***/ub xenial-security main restricted universe multiverse
deb http://sources.***.*****.***/ub xenial-updates main restricted universe multiverse
deb-src http://sources.***.*****.***/ub xenial-security main restricted universe multiverse
deb-src http://sources.***.*****.***/ub xenial-updates main restricted universe multiverse


#Kali Source
#deb http://sources.***.*****.***/kali kali-rolling main contrib non-free
星号部分是我自己内网的域名所以不透露了……
lostberryzz
2018-11-07 14:08:14 +08:00
直接 Google 搜索 generate source.list ubuntu 就好了

https://repogen.simplylinux.ch/
z0z
2018-11-07 15:54:21 +08:00
@mingl0280 多谢了:)
@lostberryzz 很受用的搜索方法:)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/505226

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX