add-apt-repository throws Python error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5locale error with apt-get installCan't add repository due to 'missing' fingerprintI want to install php 5.3.9 in ubuntu 12.04 via apt-get - what repository should I add?Can't get rid of GPG error in aptWhy Can't I add this repository?sudo apt install python-certbot-nginx error ubuntu 18.04

Time travel short story where dinosaur doesn't taste like chicken

What does おとこえしや mean?

Humans have energy, but not water. What happens?

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

What does it mean when multiple 々 marks follow a 、?

Is King K. Rool's down throw to up-special a true combo?

What is the blue range indicating on this manifold pressure gauge?

Extension of Splitting Fields over An Arbitrary Field

Why do Australian milk farmers need to protest supermarkets' milk price?

What is the dot in “1.2.4."

Life insurance that covers only simultaneous/dual deaths

"However" used in a conditional clause?

How to deal with a cynical class?

Decoding assembly instructions in a Game Boy disassembler

Sword in the Stone story where the sword was held in place by electromagnets

Time dilation for a moving electronic clock

Unreachable code, but reachable with exception

It's a yearly task, alright

Best approach to update all entries in a list that is paginated?

Coworker uses her breast-pump everywhere in the office

Making a sword in the stone, in a medieval world without magic

Touchscreen-controlled dentist office snowman collector game

Can the druid cantrip Thorn Whip really defeat a water weird this easily?

Why doesn't the EU now just force the UK to choose between referendum and no-deal?



add-apt-repository throws Python error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5


locale error with apt-get installCan't add repository due to 'missing' fingerprintI want to install php 5.3.9 in ubuntu 12.04 via apt-get - what repository should I add?Can't get rid of GPG error in aptWhy Can't I add this repository?sudo apt install python-certbot-nginx error ubuntu 18.04













21















Trying to install the latest PHP5 packages and so I add the repo (
sudo add-apt-repository ppa:ondrej/php5) I need and this is the outcome:



 Traceback (most recent call last):
File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 141, in run
self.add_ppa_signing_key(self.ppa_path)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in add_ppa_signing_key
tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 186, in _verify_fingerprint
got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 178, in _get_fingerprints
output = subprocess.check_output(cmd, universal_newlines=True)
File "/usr/lib/python3.2/subprocess.py", line 516, in check_output
output, unused_err = process.communicate()
File "/usr/lib/python3.2/subprocess.py", line 811, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/usr/lib/python3.2/subprocess.py", line 456, in _eintr_retry_call
return func(*args)
File "/usr/lib/python3.2/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)


Running on Ubuntu 12.04 Server










share|improve this question
























  • Have you messed with the default python installation (for example, symlinking python3.2 to /usr/bin/python?) - apt should be using the system default python2.7 on 12.04. Can you add the output of ls -l $(which python) to your post?

    – steeldriver
    Jul 1 '14 at 19:25












  • lrwxrwxrwx 1 root root 9 Apr 10 2013 /usr/bin/python -> python2.7 I did install the packages in order to get apt-add-repo (which messes with Python iiirc)

    – James Heald
    Jul 2 '14 at 10:32












  • In that case I don't understand why it's apparently using python3.2 - sorry

    – steeldriver
    Jul 2 '14 at 12:05















21















Trying to install the latest PHP5 packages and so I add the repo (
sudo add-apt-repository ppa:ondrej/php5) I need and this is the outcome:



 Traceback (most recent call last):
File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 141, in run
self.add_ppa_signing_key(self.ppa_path)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in add_ppa_signing_key
tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 186, in _verify_fingerprint
got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 178, in _get_fingerprints
output = subprocess.check_output(cmd, universal_newlines=True)
File "/usr/lib/python3.2/subprocess.py", line 516, in check_output
output, unused_err = process.communicate()
File "/usr/lib/python3.2/subprocess.py", line 811, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/usr/lib/python3.2/subprocess.py", line 456, in _eintr_retry_call
return func(*args)
File "/usr/lib/python3.2/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)


Running on Ubuntu 12.04 Server










share|improve this question
























  • Have you messed with the default python installation (for example, symlinking python3.2 to /usr/bin/python?) - apt should be using the system default python2.7 on 12.04. Can you add the output of ls -l $(which python) to your post?

    – steeldriver
    Jul 1 '14 at 19:25












  • lrwxrwxrwx 1 root root 9 Apr 10 2013 /usr/bin/python -> python2.7 I did install the packages in order to get apt-add-repo (which messes with Python iiirc)

    – James Heald
    Jul 2 '14 at 10:32












  • In that case I don't understand why it's apparently using python3.2 - sorry

    – steeldriver
    Jul 2 '14 at 12:05













21












21








21


4






Trying to install the latest PHP5 packages and so I add the repo (
sudo add-apt-repository ppa:ondrej/php5) I need and this is the outcome:



 Traceback (most recent call last):
File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 141, in run
self.add_ppa_signing_key(self.ppa_path)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in add_ppa_signing_key
tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 186, in _verify_fingerprint
got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 178, in _get_fingerprints
output = subprocess.check_output(cmd, universal_newlines=True)
File "/usr/lib/python3.2/subprocess.py", line 516, in check_output
output, unused_err = process.communicate()
File "/usr/lib/python3.2/subprocess.py", line 811, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/usr/lib/python3.2/subprocess.py", line 456, in _eintr_retry_call
return func(*args)
File "/usr/lib/python3.2/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)


Running on Ubuntu 12.04 Server










share|improve this question
















Trying to install the latest PHP5 packages and so I add the repo (
sudo add-apt-repository ppa:ondrej/php5) I need and this is the outcome:



 Traceback (most recent call last):
File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 141, in run
self.add_ppa_signing_key(self.ppa_path)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in add_ppa_signing_key
tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 186, in _verify_fingerprint
got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 178, in _get_fingerprints
output = subprocess.check_output(cmd, universal_newlines=True)
File "/usr/lib/python3.2/subprocess.py", line 516, in check_output
output, unused_err = process.communicate()
File "/usr/lib/python3.2/subprocess.py", line 811, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/usr/lib/python3.2/subprocess.py", line 456, in _eintr_retry_call
return func(*args)
File "/usr/lib/python3.2/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)


Running on Ubuntu 12.04 Server







server apache2 php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 26 '17 at 12:26









kenorb

4,68014054




4,68014054










asked Jul 1 '14 at 17:44









James HealdJames Heald

2772315




2772315












  • Have you messed with the default python installation (for example, symlinking python3.2 to /usr/bin/python?) - apt should be using the system default python2.7 on 12.04. Can you add the output of ls -l $(which python) to your post?

    – steeldriver
    Jul 1 '14 at 19:25












  • lrwxrwxrwx 1 root root 9 Apr 10 2013 /usr/bin/python -> python2.7 I did install the packages in order to get apt-add-repo (which messes with Python iiirc)

    – James Heald
    Jul 2 '14 at 10:32












  • In that case I don't understand why it's apparently using python3.2 - sorry

    – steeldriver
    Jul 2 '14 at 12:05

















  • Have you messed with the default python installation (for example, symlinking python3.2 to /usr/bin/python?) - apt should be using the system default python2.7 on 12.04. Can you add the output of ls -l $(which python) to your post?

    – steeldriver
    Jul 1 '14 at 19:25












  • lrwxrwxrwx 1 root root 9 Apr 10 2013 /usr/bin/python -> python2.7 I did install the packages in order to get apt-add-repo (which messes with Python iiirc)

    – James Heald
    Jul 2 '14 at 10:32












  • In that case I don't understand why it's apparently using python3.2 - sorry

    – steeldriver
    Jul 2 '14 at 12:05
















Have you messed with the default python installation (for example, symlinking python3.2 to /usr/bin/python?) - apt should be using the system default python2.7 on 12.04. Can you add the output of ls -l $(which python) to your post?

– steeldriver
Jul 1 '14 at 19:25






Have you messed with the default python installation (for example, symlinking python3.2 to /usr/bin/python?) - apt should be using the system default python2.7 on 12.04. Can you add the output of ls -l $(which python) to your post?

– steeldriver
Jul 1 '14 at 19:25














lrwxrwxrwx 1 root root 9 Apr 10 2013 /usr/bin/python -> python2.7 I did install the packages in order to get apt-add-repo (which messes with Python iiirc)

– James Heald
Jul 2 '14 at 10:32






lrwxrwxrwx 1 root root 9 Apr 10 2013 /usr/bin/python -> python2.7 I did install the packages in order to get apt-add-repo (which messes with Python iiirc)

– James Heald
Jul 2 '14 at 10:32














In that case I don't understand why it's apparently using python3.2 - sorry

– steeldriver
Jul 2 '14 at 12:05





In that case I don't understand why it's apparently using python3.2 - sorry

– steeldriver
Jul 2 '14 at 12:05










3 Answers
3






active

oldest

votes


















54














The software-properties-common is buggy, so if have a time, please report this as a bug in software-properties-common.



A better workaround was pointed out in the issue tracker that uses specific unicode locale when adding the repository



LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-5.6





share|improve this answer
































    4














    Try installing a language pack which may correct your issues with encoding, e.g.



    sudo apt-get install language-pack-en


    This will provide English translation data updates for all supported packages (including Python).



    See: UnicodeEncodeError: 'ascii' codec can't encode character.



    Otherwise set the locale settings manually, e.g.



    $ locale -a | grep "^en_.+UTF-8"
    en_GB.UTF-8
    en_US.UTF-8
    $ export LC_ALL=en_GB.UTF-8
    $ export LANG=en_GB.UTF-8


    Related: locale error with apt-get install






    share|improve this answer






























      0














      If you are in docker, this worked for me:



      RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php


      An after:



      RUN apt-get update
      RUN echo "Y" | apt-get install php7.2





      share|improve this answer






















        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "89"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f490468%2fadd-apt-repository-throws-python-error-unicodedecodeerror-ascii-codec-cant%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        54














        The software-properties-common is buggy, so if have a time, please report this as a bug in software-properties-common.



        A better workaround was pointed out in the issue tracker that uses specific unicode locale when adding the repository



        LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-5.6





        share|improve this answer





























          54














          The software-properties-common is buggy, so if have a time, please report this as a bug in software-properties-common.



          A better workaround was pointed out in the issue tracker that uses specific unicode locale when adding the repository



          LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-5.6





          share|improve this answer



























            54












            54








            54







            The software-properties-common is buggy, so if have a time, please report this as a bug in software-properties-common.



            A better workaround was pointed out in the issue tracker that uses specific unicode locale when adding the repository



            LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-5.6





            share|improve this answer















            The software-properties-common is buggy, so if have a time, please report this as a bug in software-properties-common.



            A better workaround was pointed out in the issue tracker that uses specific unicode locale when adding the repository



            LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-5.6






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Sep 26 '17 at 12:25









            kenorb

            4,68014054




            4,68014054










            answered Jul 2 '14 at 17:32









            oerdnjoerdnj

            6,9643348




            6,9643348























                4














                Try installing a language pack which may correct your issues with encoding, e.g.



                sudo apt-get install language-pack-en


                This will provide English translation data updates for all supported packages (including Python).



                See: UnicodeEncodeError: 'ascii' codec can't encode character.



                Otherwise set the locale settings manually, e.g.



                $ locale -a | grep "^en_.+UTF-8"
                en_GB.UTF-8
                en_US.UTF-8
                $ export LC_ALL=en_GB.UTF-8
                $ export LANG=en_GB.UTF-8


                Related: locale error with apt-get install






                share|improve this answer



























                  4














                  Try installing a language pack which may correct your issues with encoding, e.g.



                  sudo apt-get install language-pack-en


                  This will provide English translation data updates for all supported packages (including Python).



                  See: UnicodeEncodeError: 'ascii' codec can't encode character.



                  Otherwise set the locale settings manually, e.g.



                  $ locale -a | grep "^en_.+UTF-8"
                  en_GB.UTF-8
                  en_US.UTF-8
                  $ export LC_ALL=en_GB.UTF-8
                  $ export LANG=en_GB.UTF-8


                  Related: locale error with apt-get install






                  share|improve this answer

























                    4












                    4








                    4







                    Try installing a language pack which may correct your issues with encoding, e.g.



                    sudo apt-get install language-pack-en


                    This will provide English translation data updates for all supported packages (including Python).



                    See: UnicodeEncodeError: 'ascii' codec can't encode character.



                    Otherwise set the locale settings manually, e.g.



                    $ locale -a | grep "^en_.+UTF-8"
                    en_GB.UTF-8
                    en_US.UTF-8
                    $ export LC_ALL=en_GB.UTF-8
                    $ export LANG=en_GB.UTF-8


                    Related: locale error with apt-get install






                    share|improve this answer













                    Try installing a language pack which may correct your issues with encoding, e.g.



                    sudo apt-get install language-pack-en


                    This will provide English translation data updates for all supported packages (including Python).



                    See: UnicodeEncodeError: 'ascii' codec can't encode character.



                    Otherwise set the locale settings manually, e.g.



                    $ locale -a | grep "^en_.+UTF-8"
                    en_GB.UTF-8
                    en_US.UTF-8
                    $ export LC_ALL=en_GB.UTF-8
                    $ export LANG=en_GB.UTF-8


                    Related: locale error with apt-get install







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 26 '17 at 12:25









                    kenorbkenorb

                    4,68014054




                    4,68014054





















                        0














                        If you are in docker, this worked for me:



                        RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php


                        An after:



                        RUN apt-get update
                        RUN echo "Y" | apt-get install php7.2





                        share|improve this answer



























                          0














                          If you are in docker, this worked for me:



                          RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php


                          An after:



                          RUN apt-get update
                          RUN echo "Y" | apt-get install php7.2





                          share|improve this answer

























                            0












                            0








                            0







                            If you are in docker, this worked for me:



                            RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php


                            An after:



                            RUN apt-get update
                            RUN echo "Y" | apt-get install php7.2





                            share|improve this answer













                            If you are in docker, this worked for me:



                            RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php


                            An after:



                            RUN apt-get update
                            RUN echo "Y" | apt-get install php7.2






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 43 mins ago









                            JRichardszJRichardsz

                            1135




                            1135



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f490468%2fadd-apt-repository-throws-python-error-unicodedecodeerror-ascii-codec-cant%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                                Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                                Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»