我想使用 ondrej ppa 升级 ubuntu 服务器中的 php 版本。我已连接到互联网。
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
Run Code Online (Sandbox Code Playgroud)
我尝试并得到一个错误:
Cannot add PPA: 'ppa:ondrej/ubuntu/php'
'ondrej' user or team does not exist
Run Code Online (Sandbox Code Playgroud)
我尝试-E
在命令中使用,错误是相同的。
关于代理设置,我不太明白。我不知道如何根据这里的答案调整设置
我也尝试过这个:
RUN apt-get -y install locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN add-apt-repository -y ppa:ondrej/php
Run Code Online (Sandbox Code Playgroud)
但结果是一样的,报错无法添加ppa:ondrej
谢谢
小智 1
显然这是 DNS 的问题或服务器已关闭,因为您发布的命令现在可以成功运行。
sudo add-apt-repository ppa:ondrej/php
Run Code Online (Sandbox Code Playgroud)
更新后,sudo apt install php
安装最新的PHP版本(目前7.3)
也许问题是由
\n\n我尝试使用实时 Ubuntu 16.04.1 LTS,并且我可以添加存储库ppa:ondrej/php
。
有警告:“add-apt-repository 因非 UTF-8 语言环境而损坏。”以及解决方法的提示。见下文。
\n\nubuntu@ubuntu:~$ sudo add-apt-repository ppa:ondrej/php\n Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions\n are included. Only Supported Versions of PHP\n (http://php.net/supported-versions.php) for Supported Ubuntu Releases\n (https://wiki.ubuntu.com/Releases) are provided. Don\'t ask for end-of-life\n PHP versions or Ubuntu release, they won\'t be provided.\n\nDebian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa\n\nYou can get more information about the packages at https://deb.sury.org\n\nBUGS&FEATURES: This PPA now has a issue tracker:\nhttps://deb.sury.org/#bug-reporting\n\nCAVEATS:\n1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman\n2. If you are using apache2, you are advised to add ppa:ondrej/apache2\n3. If you are using nginx, you are advise to add ppa:ondrej/nginx-mainline\n\xc2\xa0\xc2\xa0\xc2\xa0or ppa:ondrej/nginx\n\nPLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/\n\nWARNING: add-apt-repository is broken with non-UTF-8 locales, see \nhttps://github.com/oerdnj/deb.sury.org/issues/56 for workaround:\n\n# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php\n More info: https://launchpad.net/~ondrej/+archive/ubuntu/php\nPress [ENTER] to continue or ctrl-c to cancel adding it\n\ngpg: keyring `/tmp/tmppiurqcxa/secring.gpg\' created\ngpg: keyring `/tmp/tmppiurqcxa/pubring.gpg\' created\ngpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com\ngpg: /tmp/tmppiurqcxa/trustdb.gpg: trustdb created\ngpg: key E5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur\xc3\xbd" imported\ngpg: Total number processed: 1\ngpg: imported: 1 (RSA: 1)\nOK\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
24136 次 |
最近记录: |