Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add PPA Key #56

Closed
aranw opened this issue Apr 9, 2015 · 27 comments
Closed

Unable to add PPA Key #56

aranw opened this issue Apr 9, 2015 · 27 comments

Comments

@aranw
Copy link

aranw commented Apr 9, 2015

Hey,

Trying to add the PPA key but it seems to always fail due to the your name in the PPA Key.

gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: key E5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur�" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
@mengstr
Copy link

mengstr commented Apr 16, 2015

Running on Ubuntu I do like this to get his PPA's working:

apt-get update &&
apt-get install -y language-pack-en-base &&
export LC_ALL=en_US.UTF-8 &&
export LANG=en_US.UTF-8 &&
apt-get install -y software-properties-common &&
add-apt-repository -y ppa:ondrej/php5-5.6 &&
add-apt-repository -y ppa:ondrej/mariadb-10.0 && 
apt-get update && 
apt-get -y upgrade

@aranw
Copy link
Author

aranw commented Apr 16, 2015

I found the fix was for me to set the language to UTF-8.

locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Edit:

As pointed out by @SmallRoomLabs some Ubuntu installs don't have local-gen installed by default.

To add it run sudo apt-get install -y language-pack-en-base then use the commands listed above.

@mengstr
Copy link

mengstr commented Apr 16, 2015

The AMI that I use on AWS doesn't have the language pack installed by default so I had to install language-pack-en-base. Just doing the locale-gen didn't cut it for me.

But even after 22 years of screwing around with Linux (0.99pl3 was the kernel on my first dist) I'm still more than just a bit confused when it comes to character- & language encodings. ;-)

@oerdnj
Copy link
Owner

oerdnj commented Apr 16, 2015

Unfortunately that's something broken by Ubuntu and has to be fixed by Ubuntu. I will leave this open for others to find. Thanks for the workaround...

@oerdnj
Copy link
Owner

oerdnj commented Sep 7, 2015

JFTR this is shortened version that should work (run as root):

# apt-get install -y language-pack-en-base
# LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/<repository>

@Seldaek
Copy link

Seldaek commented Dec 19, 2015

@oerdnj has this been reported to ubuntu? And alternatively while I fully understand that it's not your fault, would it be an option for you to use a transliterated version of your name instead of the full unicode one? That would be a good workaround I guess.

@oerdnj
Copy link
Owner

oerdnj commented Dec 20, 2015

Should I also change my official name so your copy & paste buffer doesn't get cluttered with few more characters?

No, I am definitely not going to use transliterated name because it's 2015 and I like my name as it is.

@Seldaek
Copy link

Seldaek commented Dec 20, 2015 via email

@oerdnj
Copy link
Owner

oerdnj commented Jan 8, 2016

I have added instructions to every major PPA description how to circumvent this issue. Hope this fixes most problems.

@oerdnj
Copy link
Owner

oerdnj commented Mar 3, 2016

JFTR: LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php also works.

@rvadym
Copy link

rvadym commented Jun 11, 2016

Dockerfile part for official Ubuntu 14 docker image which worked for me

# required by PHP 5.6
RUN DEBIAN_FRONTEND=noninteractive \
    apt-get update && \
    apt-get install -y language-pack-en-base &&\
    export LC_ALL=en_US.UTF-8 && \
    export LANG=en_US.UTF-8


RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y software-properties-common
RUN DEBIAN_FRONTEND=noninteractive LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php


RUN DEBIAN_FRONTEND=noninteractive LC_ALL=en_US.UTF-8 \
    apt-get update && apt-get install -y \
    php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml

@ktamas77
Copy link

ktamas77 commented Jul 4, 2016

@rvadym your solution is excellent, there is only a small issue, you missed a -y to avoid interactions this line; the noninteractive flag is not enough (docker / ubuntu xenial). With the -y parameter it works:
RUN DEBIAN_FRONTEND=noninteractive LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php

@rvadym
Copy link

rvadym commented Jul 4, 2016

@ktamas77 I think you're right. It is just part of much bigger config, so I might miss some small details accidentally. Thanks for pointing this out.

@hypotheses
Copy link

With the current locale setting

ubuntu1604# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

I still got the warning below. Is this something I can ignore?

add-apt-repository ppa:ondrej/php
 Co-installable PHP versions: PHP 5.5, 5.6, PHP 7.0 and batteries included.

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

For PHP 5.4 on Ubuntu 12.04 use: ppa:ondrej/php5-oldstable

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

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

maikoe added a commit to maikoe/www-lamp that referenced this issue Feb 27, 2017
Issue add-apt-repository is broken with non-UTF-8 locales, see oerdnj/deb.sury.org#56
Workaround added to dockerfile
SniperSister added a commit to joomla-projects/docker-php71 that referenced this issue Jun 17, 2017
@mstnorris
Copy link

I have done what is suggested above and added the following two lines to the top of my install.sh script.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php

Yet I still get the following message:

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

Am I missing something?

@aadityamundhalia
Copy link

I am not able to run it every time i get below erroe can some one please help
gpg: keybox '/tmp/tmpi_5eo952/pubring.gpg' created
gpg: keyserver receive failed: No data
Failed to add key.

@shadowhand
Copy link

shadowhand commented May 25, 2018

No matter what I do, this is still an issue for me on 16.04. I have tried the this fix multiple times in different ways (using Ansible) and none of them work. The end result is always:

E: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu xenial Release' is no longer signed.                                                         
N: Updating from such a repository can't be done securely, and is therefore disabled by default.                                                           
N: See apt-secure(8) manpage for repository creation and user configuration details. 

Edit: See below, seems to have been something screwy with the state of SSL on my OS.

@todeveni
Copy link
Contributor

todeveni commented May 25, 2018

@shadowhand

- name: Add PHP repository
  apt_repository:
    repo: deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
    state: present

- name: Add PHP repository signing key
  apt_key:
    keyserver: keyserver.ubuntu.com
    id: 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C

@shadowhand
Copy link

@todeveni did not work, same error.

@todeveni
Copy link
Contributor

@shadowhand Works for me 🙂

Here's the full vagrant setup I tested it on.

@shadowhand
Copy link

shadowhand commented May 27, 2018

Well, I was having some other SSL issues with composer so I decided to reinstall my OS completely and now everything appears to be working. 🧐

@shadowhand
Copy link

I spoke too soon. Every time there is an ansible package install it will fail ~50% of the time. I can even SSH into the vagrant machine and manually run sudo apt-get update and sometimes it will error and sometimes not. At a loss as to what to do.

@todeveni
Copy link
Contributor

@emilklindt You're trying to add Ubuntu repo to Debian. Doesn't work that way.

Repository owner deleted a comment from o-ayoub Mar 27, 2019
@o-ayoub
Copy link

o-ayoub commented Mar 27, 2019

No, it s ubnutu 16.04 Xenial.
ubuntu

@caiowilson
Copy link

caiowilson commented May 17, 2019

I'd like to add that you can just
sudo apt-get install -y language-pack-en-base && sudo export LC_ALL=en_US.UTF-8 && sudo export LANG=en_US.UTF-8 && sudo apt-get install -y software-properties-common

then proceed as normal (ie: sudo apt-get install -y php7.2) etc.
works with ubuntu based and ubuntu versions with problems with locale.

@oerdnj
Copy link
Owner

oerdnj commented Jun 12, 2019

Stop hijacking old issues for unrelated chitchat.

Repository owner locked as resolved and limited conversation to collaborators Jun 12, 2019
Repository owner deleted a comment from deepakbaltech Jun 12, 2019
Repository owner deleted a comment from todeveni Jun 12, 2019
Repository owner deleted a comment from deepakbaltech Jun 12, 2019
Repository owner deleted a comment from ftejada1 Jun 12, 2019
Repository owner deleted a comment from o-ayoub Jun 12, 2019
Repository owner deleted a comment from ftejada1 Jun 12, 2019
Repository owner deleted a comment from todeveni Jun 12, 2019
Repository owner deleted a comment from o-ayoub Jun 12, 2019
Repository owner deleted a comment from ftejada1 Jun 12, 2019
Repository owner deleted a comment from o-ayoub Jun 12, 2019
@oerdnj
Copy link
Owner

oerdnj commented Jun 12, 2019

Also asking for other user contact details here, will get you blocked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests