V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
z0z
V2EX  ›  问与答

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

  •  
  •   z0z · 2018-11-07 08:51:22 +08:00 · 3270 次点击
    这是一个创建于 2241 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    见谅,当一回伸手党。

    11 条回复    2018-11-07 15:54:21 +08:00
    z0z
        1
    z0z  
    OP
       2018-11-07 08:52:52 +08:00
    ubuntu16.04 LTS
    z0z
        2
    z0z  
    OP
       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
        3
    lonccc  
       2018-11-07 08:56:42 +08:00 via Android
    z0z
        4
    z0z  
    OP
       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
        5
    heimeil  
       2018-11-07 09:42:29 +08:00
    哥哥,source 是用来更新 shell 环境变量的,sources.list 是 apt 的配置文件,用#3 的镜像源改了 sources.list 再用 sudo apt update 更新缓存,用国内的源会快很多,另外注意 Ubuntu 版本。
    z0z
        6
    z0z  
    OP
       2018-11-07 09:49:57 +08:00
    @heimeil 我是不是被 https://blog.csdn.net/swiftfake/article/details/79098345 里面的 source 用法误导了
    ooeyunarika
        7
    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
        8
    z0z  
    OP
       2018-11-07 11:37:24 +08:00
    @ooeyunarika 是的,现在基本明白 source 是干嘛的了。
    mingl0280
        9
    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
        10
    lostberryzz  
       2018-11-07 14:08:14 +08:00
    直接 Google 搜索 generate source.list ubuntu 就好了

    https://repogen.simplylinux.ch/
    z0z
        11
    z0z  
    OP
       2018-11-07 15:54:21 +08:00
    @mingl0280 多谢了:)
    @lostberryzz 很受用的搜索方法:)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3645 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:20 · PVG 12:20 · LAX 20:20 · JFK 23:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.