CodeNewbee
CodeNewbee

Reputation: 316

E: Unable to locate package language-pack-en-base

i am trying to upgrade to PHP 7.0 on my debian 8 computer using this guide:https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04

when i run sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php-7.0 i get this output:

You are about to add the following PPA to your system: PPA with PHP 7.0. If you want a co-installable version of PHP, please use:

ppa:ondrej/php

where PHP 7.0 and PHP 5.6 co-exists.

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

For PHP 5.6 use: ppa:ondrej/php5-5.6
For PHP 5.5 use: ppa:ondrej/php5
For PHP 5.4 use: ppa:ondrej/php5-oldstable

BUGS&FEATURES: This PPA now has a issue tracker: https://deb.sury.org/pages/bugreporting.html

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating:

https://deb.sury.org/pages/donate.html

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

# apt-get install -y language-pack-en-base
# LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php-7.0
 More info: https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmplffxdbmn/secring.gpg' created
gpg: keyring `/tmp/tmplffxdbmn/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmplffxdbmn/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/dist-packages/softwareproperties/ppa.py", line 153, in run
    self.add_ppa_signing_key(self.ppa_path)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 250, in add_ppa_signing_key
    tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 202, in _verify_fingerprint
    got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 194, in _get_fingerprints
    output = subprocess.check_output(cmd, universal_newlines=True)
  File "/usr/lib/python3.4/subprocess.py", line 609, in check_output
    output, unused_err = process.communicate(inputdata, timeout=timeout)
  File "/usr/lib/python3.4/subprocess.py", line 947, in communicate
    stdout = _eintr_retry_call(self.stdout.read)
  File "/usr/lib/python3.4/subprocess.py", line 491, 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)

so i tried the workaround suggested by the guide using this command: sudo apt-get install -y language-pack-en-base and I get this error:

W: Duplicate sources.list entry http://debian.linux.edu.lv/debian/ jessie/main amd64 Packages (/var/lib/apt/lists/debian.linux.edu.lv_debian_dists_jessie_main_binary-amd64_Packages) W: You may want to run apt-get update to correct these problems E: Unable to locate package language-pack-en-base

Upvotes: 2

Views: 4208

Answers (1)

drchuck
drchuck

Reputation: 4675

The way I solved this on Ubuntu 14.04 and PHP 7.2 from ppa:ondrej/php was to add this earlier in my setup script:

export LC_ALL=C.UTF-8 

This was the output of my locale -a command right before I changed the environment variable:

C
C.UTF-8
POSIX

Hope this helps.

Upvotes: 0

Related Questions