Erro ao processar pacotes ao tentar instalar python-pygame [closed]

0

Qualquer coisa que eu tente instalar usando o apt-get install, simplesmente não funciona.

Eu tenho usado o Elementary OS (baseado no Ubuntu) desde ontem, então sou muito novo no Linux.

Aqui está um exemplo do meu problema:

$ sudo apt-get install python-pygame
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-pygame is already the newest version.
The following extra packages will be installed:
  apport kde-l10n-engb python-urllib3
Suggested packages:
  apport-gtk apport-kde
Recommended packages:
  apport-symptoms
The following packages will be upgraded:
  apport kde-l10n-engb python-urllib3
3 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
19 not fully installed or removed.
Need to get 0 B/2.537 kB of archives.
After this operation, 9.875 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 209029 files and directories currently installed.)
Preparing to unpack .../apport_2.14.1-0ubuntu3.10_all.deb ...
apport stop/waiting
/var/lib/dpkg/info/apport.prerm: 14: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 14: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/apport_2.14.1-0ubuntu3.10_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../kde-l10n-engb_4%3a4.13.0-0ubuntu1_all.deb ...
Unpacking kde-l10n-engb (4:4.13.0-0ubuntu1) over (4:4.13.0-0ubuntu1) ...
Preparing to unpack .../python-urllib3_1.7.1-1ubuntu3_all.deb ...
/var/lib/dpkg/info/python-urllib3.prerm: 6: /var/lib/dpkg/info/python-urllib3.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-urllib3_1.7.1-1ubuntu3_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-urllib3.postinst: 6: /var/lib/dpkg/info/python-urllib3.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/apport_2.14.1-0ubuntu3.10_all.deb
 /var/cache/apt/archives/python-urllib3_1.7.1-1ubuntu3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por d0n.key 13.05.2015 / 15:20

1 resposta

1

Eu tive o mesmo problema. Por alguma razão, você não pode instalar o pacote pygame diretamente usando apt-get . Eu sugiro que você acesse a seção de download do site do pygame e baixe pygame-1.9.1release.tar.gz (ou qualquer versão estável).

abra seu terminal e navegue até a pasta baixada. Descompacte o arquivo, supondo que você esteja no diretório Downloads

tar -xvf pygame-1.9.1release.tar.gz
cd pygame-1.9.1release   #navigate to the extracted directory

e execute o seguinte comando para instalar o pacote.

sudo python Setup.py

Isso deve instalar o pacote pygame para você.

Como alternativa, você pode baixar a versão estável do pygame de este link para arquitetura AMD e < um href="http://packages.ubuntu.com/trusty/i386/python-pygame/download"> aqui para i386 como um pacote deb e instale-o com

sudo dpkg -i packagename
    
por rulebreaker4 13.05.2015 / 16:49