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 · 22 comments

Comments

Projects
None yet
@aranw

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)
@SmallRoomLabs

This comment has been minimized.

Show comment
Hide comment
@SmallRoomLabs

SmallRoomLabs 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

SmallRoomLabs 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

This comment has been minimized.

Show comment
Hide comment
@aranw

aranw 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.

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.

@SmallRoomLabs

This comment has been minimized.

Show comment
Hide comment
@SmallRoomLabs

SmallRoomLabs 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. ;-)

SmallRoomLabs 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

This comment has been minimized.

Show comment
Hide comment
@oerdnj

oerdnj Apr 16, 2015

Owner

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...

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

This comment has been minimized.

Show comment
Hide comment
@oerdnj

oerdnj Sep 7, 2015

Owner

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>
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

This comment has been minimized.

Show comment
Hide comment
@Seldaek

Seldaek 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.

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

This comment has been minimized.

Show comment
Hide comment
@oerdnj

oerdnj Dec 20, 2015

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@Seldaek

Seldaek Dec 20, 2015

Seldaek commented Dec 20, 2015

@oerdnj

This comment has been minimized.

Show comment
Hide comment
@oerdnj

oerdnj Jan 8, 2016

Owner

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

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

This comment has been minimized.

Show comment
Hide comment
@oerdnj

oerdnj Mar 3, 2016

Owner

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

Owner

oerdnj commented Mar 3, 2016

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

@rvadym

This comment has been minimized.

Show comment
Hide comment
@rvadym

rvadym 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

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

This comment has been minimized.

Show comment
Hide comment
@ktamas77

ktamas77 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

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

This comment has been minimized.

Show comment
Hide comment
@rvadym

rvadym 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.

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

This comment has been minimized.

Show comment
Hide comment
@hypotheses

hypotheses Nov 6, 2016

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

hypotheses commented Nov 6, 2016

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

Update Dockerfile
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

@Trabel Trabel referenced this issue Aug 13, 2017

Closed

How to use it? #39

@mstnorris

This comment has been minimized.

Show comment
Hide comment
@mstnorris

mstnorris Sep 29, 2017

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?

mstnorris commented Sep 29, 2017

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

This comment has been minimized.

Show comment
Hide comment
@aadityamundhalia

aadityamundhalia Feb 22, 2018

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.

aadityamundhalia commented Feb 22, 2018

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

This comment has been minimized.

Show comment
Hide comment
@shadowhand

shadowhand 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.

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

This comment has been minimized.

Show comment
Hide comment
@todeveni

todeveni 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

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

This comment has been minimized.

Show comment
Hide comment
@shadowhand

shadowhand May 25, 2018

@todeveni did not work, same error.

shadowhand commented May 25, 2018

@todeveni did not work, same error.

@todeveni

This comment has been minimized.

Show comment
Hide comment
@todeveni

todeveni May 25, 2018

@shadowhand Works for me 🙂

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

todeveni commented May 25, 2018

@shadowhand Works for me 🙂

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

@shadowhand

This comment has been minimized.

Show comment
Hide comment
@shadowhand

shadowhand 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 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

This comment has been minimized.

Show comment
Hide comment
@shadowhand

shadowhand May 28, 2018

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.

shadowhand commented May 28, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment