como evitar esse bug instalando o PHPMyAdmin no Ubuntu 16.04?

3

Eu recentemente atualizei meu servidor do Ubuntu 14.04 para o Ubuntu 16.04, mas a versão do phpmyadmin ainda é 4.5, enquanto eu quero instalar o 4.6 (para suporte do novo tipo JSON).

As instruções comuns que eu acho online é adicionar o repositório nijel/phpmyadmin via apt-add-repository, mas isso me causa um bug estranho.

root@myserver:~# add-apt-repository ppa:nijel/phpmyadmin
 Latest phpMyAdmin packages - https://www.phpmyadmin.net/. Based on packages available in Debian.

There are some notable changes:

* it currently requires updated PHP packages, you can get packages from https://launchpad.net/~ondrej/+archive/ubuntu/php/
* it does include embedded copies of PHP libraries

If you like phpMyAdmin, you can support it's further development at https://www.phpmyadmin.net/donate/ or https://www.phpmyadmin.net/sponsors/, thanks!
 More info: https://launchpad.net/~nijel/+archive/ubuntu/phpmyadmin
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring '/tmp/tmp9zj2r1n2/secring.gpg' created
gpg: keyring '/tmp/tmp9zj2r1n2/pubring.gpg' created
gpg: requesting key 06ED541C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp9zj2r1n2/trustdb.gpg: trustdb created
gpg: key 06ED541C: public key "Launchpad PPA for Michal \xc4\x8ciha\xc5\x99" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
    func(**kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 401, in add_key
    return apsk.add_ppa_signing_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 271, in add_ppa_signing_key
    tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 220, in _verify_fingerprint
    got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 212, in _get_fingerprints
    output = subprocess.check_output(cmd, universal_newlines=True)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 695, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.5/subprocess.py", line 1059, in communicate
    stdout = self.stdout.read()
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 96: ordinal not in range(128)

isso parece um bug no software ppa, mas estou perdido em como resolver isso.

    
por user1111929 07.01.2017 / 20:39

3 respostas

2

Eu encontrei uma solução. Aparentemente, é um problema de localização do sistema. Eu corri

sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8

e o ppa pode ser usado sem qualquer problema.

    
por user1111929 07.01.2017 / 21:30
1

Tente novamente? Pode ser corrigido desde que eu recebo isso:

$ sudo add-apt-repository ppa:nijel/phpmyadmin
[sudo] password for rinzwind: 
 Latest phpMyAdmin packages - https://www.phpmyadmin.net/. Based on packages available in Debian.

There are some notable changes:

* it currently requires updated PHP packages, you can get packages from https://launchpad.net/~ondrej/+archive/ubuntu/php/
* it does include embedded copies of PHP libraries

If you like phpMyAdmin, you can support it's further development at https://www.phpmyadmin.net/donate/ or https://www.phpmyadmin.net/sponsors/, thanks!
 More info: https://launchpad.net/~nijel/+archive/ubuntu/phpmyadmin
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpzsijcqvx/pubring.gpg' created
gpg: /tmp/tmpzsijcqvx/trustdb.gpg: trustdb created
gpg: key 80E7349A06ED541C: public key "Launchpad PPA for Michal Čihař" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
OK

Veja o nome? Eu recebo Čihař onde você tem \ xc4 \ x8ciha \ xc5 \ x99. Portanto, é um problema de codificação / decodificação de um caractere sem ASCII.

Se isso não funcionar, registre-o em sua página da barra de lançamento: link

    
por Rinzwind 07.01.2017 / 21:08
1

Em resposta à sua pergunta, adicionei o PPA e o executei para ver o que aconteceria. Ao executá-lo, recebi um monte de mensagens de erro. Mas então a atualização do software do Ubuntu apareceu sozinha e eu corri. Isso atualizou phpMyAdmin para 4.6.5.2deb1+deb.cihar.com~xenial.3

No entanto, isso resultou no seguinte aviso: " A senha secreta na configuração (blowfish_secret) é muito curta. "

Para resolver esse problema, você precisa modificar o arquivo: / var/lib/phpmyadmin/blowfish_secret.inc.php.

 <?php
// $cfg['blowfish_secret'] = 'U0v9kMkdKICvsc6NYgfqryAu';
// modified 1/7/2017
// http://serverfault.com/questions/615550/phpmyadmin-error-the-configuration-file-now-needs-a-secret-passphrase
$cfg['blowfish_secret'] = 'mrgQxxk8C-y}U7ji2BO9o5jLf}Qhe-BI[~6SUa';

O phpMyAdmin agora é carregado sem nenhuma mensagem de aviso.

    
por Steve R. 07.01.2017 / 21:49