fideloper / docker-nginx-php

An Ubuntu, Nginx and PHP stack Built in Docker
361 stars 142 forks source link

Having issue on adding ppa:ondrej/php5 #15

Closed matriphe closed 9 years ago

matriphe commented 9 years ago

I got this error when building this on add-apt-repository -y ppa:ondrej/php5. Here's the error:

gpg: keyring `/tmp/tmp07lyg_wt/secring.gpg' created
gpg: keyring `/tmp/tmp07lyg_wt/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp07lyg_wt/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur�" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 687, in addkey_func
    func(**kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 370, in add_key
    return apsk.add_ppa_signing_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 261, in add_ppa_signing_key
    tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 210, in _verify_fingerprint
    got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 202, in _get_fingerprints
    output = subprocess.check_output(cmd, universal_newlines=True)
  File "/usr/lib/python3.4/subprocess.py", line 605, in check_output
    output, unused_err = process.communicate(inputdata, timeout=timeout)
  File "/usr/lib/python3.4/subprocess.py", line 936, in communicate
    stdout = _eintr_retry_call(self.stdout.read)
  File "/usr/lib/python3.4/subprocess.py", line 487, in _eintr_retry_call
    return func(*args)
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 92: ordinal not in range(128)

Is this issue came from phusion/baseimage?

matriphe commented 9 years ago

By the way, I modified the Docker file, using phusion/baseimage:0.9.16.

matriphe commented 9 years ago

Don't know what's going on, but I change the RUN add-apt-repository -y ppa:ondrej/php5 line and it's worked.

RUN touch /etc/apt/sources.list.d/ondrej-php5.list
RUN echo "deb http://ppa.launchpad.net/ondrej/php5/ubuntu trusty main" >> /etc/apt/sources.list.d/ondrej-php5.list
RUN echo "deb-src http://ppa.launchpad.net/ondrej/php5/ubuntu trusty main" >> /etc/apt/sources.list.d/ondrej-php5.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C

Hope it's helped someone who had same issue.

fideloper commented 9 years ago

That's interesting, thanks!

Sorry for the huge delay in getting back to you on this :/

I can update this repo for that (I don't use this repo anymore, so I don't modify it much).

galindro commented 8 years ago

@fideloper please reopen this ticket. I'm having this issue with phusion/baseimage:0.9.18

fideloper commented 8 years ago

This is really old and for the most part unmaintained - i don’t have the time unfortunately. I won’t be looking into the issue, but I can leave this open if you really want.

On Tue, Jan 12, 2016 at 3:28 PM Bruno Galindro da Costa < notifications@github.com> wrote:

@fideloper https://github.com/fideloper please reopen this ticket. I'm having this issue with phusion/baseimage:0.9.18

— Reply to this email directly or view it on GitHub https://github.com/fideloper/docker-nginx-php/issues/15#issuecomment-171062229 .

galindro commented 8 years ago

No no... I have put my comment because I was thinking that this could be important to this project. I've fixed using the @matriphe proposed solution using apt-key

fideloper commented 8 years ago

Sounds good!

On Wed, Jan 13, 2016 at 4:53 AM, Bruno Galindro da Costa < notifications@github.com> wrote:

No no... I have put my comment because I was thinking that this could be important to this project. I've fixed using the @matriphe https://github.com/matriphe proposed solution using apt-key

— Reply to this email directly or view it on GitHub https://github.com/fideloper/docker-nginx-php/issues/15#issuecomment-171253162 .

natgho-reidin commented 7 years ago

Try this; LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php

quanengineering commented 6 years ago

@natgho-reidin It works. Your solution saved my day!

mhamzas commented 6 years ago

@natgho-reidin , yes it worked. Thanks

abhijitgujar86 commented 5 years ago

"LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php" worked for me too , but i did not get why ?

dev-head commented 5 years ago

because the owner of the php ppa, while awesome of him to contribute to the eco with his stable packages, does not wish to provide the package meta data in a format that's supported by ubuntu. It's his repo, his work and of course his name and he's allowed to do whatever he wants; regardless if it helps the people who use it. we're always free to create our own and not use his packages.

devs reasoning: https://github.com/oerdnj/deb.sury.org/issues/56

Sheridan commented 5 years ago
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