E:无法找到package language-pack-en-base

时间:2015-12-25 16:26:37

标签: php debian

我正在尝试使用本指南在我的debian 8计算机上升级到PHP 7.0:https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04

当我运行sudo时LC_ALL = en_US.UTF-8 add-apt-repository ppa:ondrej / php-7.0我得到这个输出:

  

您即将在系统中添加以下PPA:        PPA与PHP 7.0。如果您想要可共同安装的PHP版本,请使用:

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)

所以我尝试了使用此命令的指南建议的解决方法:sudo apt-get install -y language-pack-en-base我收到此错误:

  

W:重复来源。列表条目http://debian.linux.edu.lv/debian/   jessie / main amd64包   (/var/lib/apt/lists/debian.linux.edu.lv_debian_dists_jessie_main_binary-amd64_Packages)       W:您可能希望运行apt-get update来纠正这些问题       E:无法找到package language-pack-en-base

1 个答案:

答案 0 :(得分:0)

我在Upantu 14.04上解决这个问题的方法和来自ppa:ondrej / php的PHP 7.2在我的设置脚本中添加了这个:

export LC_ALL=C.UTF-8 

在我更改环境变量之前,这是我的locale -a命令的输出:

C
C.UTF-8
POSIX

希望这有帮助。