4

I want to use ondrej ppa to upgrade php version in ubuntu server. I have connected to internet connection.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php

I tried and got an error:

Cannot add PPA: 'ppa:ondrej/ubuntu/php'
'ondrej' user or team does not exist

I had tried using -E in the command and the error is the same.

about the proxy setting, I do not really understand. I do not know how to adjust the setting according the answer in here

I also tried this:

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

but the result is the same, the error cannot add ppa:ondrej

Thank you

wjandrea
  • 14,109
  • 4
  • 48
  • 98
joun
  • 143
  • 1
  • 2
  • 8
  • Please [edit] your question and post the exact error message that you are receiving. – pa4080 Jan 23 '19 at 08:41
  • Which ubuntu version are you using? – dufte Jan 23 '19 at 08:51
  • ubuntu version 16.04 – joun Jan 23 '19 at 08:59
  • Did you check the answers [here](https://askubuntu.com/questions/724224/cant-add-ppa-on-ubuntu-15-10-user-or-team-does-not-exist) and [here](https://askubuntu.com/questions/971877/cannot-add-ppa-user-or-team-does-not-exist/1036627)? And if so, please edit the question and add the information what you tried. – pLumo Jan 23 '19 at 09:39

2 Answers2

1

Apparently it was an issue with DNS or the server was down because the commands you posted are now working successfully.

sudo add-apt-repository ppa:ondrej/php

After the update, sudo apt install php installed the latest PHP version (currently 7.3)

damadam
  • 2,815
  • 3
  • 17
  • 38
Wildhair
  • 11
  • 3
0

Maybe the problem is caused by

  • your locale (language etc)
  • your computer's internet connection
  • some [other] installed PPA or program package

I tried with a live Ubuntu 16.04.1 LTS, and I could add the repository ppa:ondrej/php.

There was a warning: 'add-apt-repository is broken with non-UTF-8 locales.' and a tip with a work-around. See below.

ubuntu@ubuntu:~$ sudo add-apt-repository ppa:ondrej/php
 Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions
 are included. Only Supported Versions of PHP
 (http://php.net/supported-versions.php) for Supported Ubuntu Releases
 (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life
 PHP versions or Ubuntu release, they won't be provided.

Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa

You can get more information about the packages at https://deb.sury.org

BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting

CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advise to add ppa:ondrej/nginx-mainline
   or ppa:ondrej/nginx

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/

WARNING: add-apt-repository is broken with non-UTF-8 locales, see 
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:

# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmppiurqcxa/secring.gpg' created
gpg: keyring `/tmp/tmppiurqcxa/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmppiurqcxa/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
sudodus
  • 45,126
  • 5
  • 87
  • 151
  • I am able to get through apt without error of "user or team ondrej does not exist". But I am stucked with the key...after press enter..it shows invalid http proxy (proxy address):bad URI and failed to add key – joun Jan 28 '19 at 05:21