【问题标题】:add PPA failed in Docker container在 Docker 容器中添加 PPA 失败
【发布时间】:2014-10-21 12:26:25
【问题描述】:

我在 docker 容器中运行了 add-apt-repository ppa:ubuntu-wine/ppa,但由于通知失败:

Cannot add PPA: 'ppa:ppaname/ppa'.
Please check that the PPA name or format is crrect.

它在主机上的工作方式。

google了很多之后,我尝试了以下方法:

apt-get install python-software-properties
apt-get install software-properties-common
apt-get install --reinstall ca-certificates

没有用。

主机上的系统是ubuntu 14.04,64bit。

容器镜像基于DOCKER HUB的ubuntu 14.04。

谁能帮帮我?

【问题讨论】:

    标签: ubuntu docker apt


    【解决方案1】:

    我不确定你出了什么问题。

    这是我的工作方式:

    $ docker run -t -i --rm ubuntu:14.04 /bin/bash
    
    And inside the container
    # apt-get update && apt-get install -y software-properties-common
    # add-apt-repository ppa:ubuntu-wine/ppa
    # apt-get update
    

    【讨论】:

    • 我解决了这个问题。容器的镜像是基于 Debian wheezy,而不是 ubuntu。我犯了一个愚蠢的错误。
    • 就我而言,apt-get install -y software-properties-common 解决了这个问题。
    【解决方案2】:

    尝试在之前定义这个变量

    LC_ALL=C.UTF-8 add-apt-repository ppa:ppaname/ppa
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-02
      • 2020-02-08
      • 1970-01-01
      • 2019-06-23
      • 1970-01-01
      相关资源
      最近更新 更多