Não é possível instalar o libsdl2-dev devido a dependências não atendidas

4

Estou executando o Ubuntu 16.04 e estou tentando instalar o libsdl2-dev sem sucesso. Eu pesquisei no Google e segui várias respostas neste site e muito mais. Eu tentei reduzir meus repositórios apenas para os seguros, execute o apt-get update, o apt-get upgrade .. e tantas outras coisas que eu não posso lembrar exatamente agora. Eu tentei tudo o que pude encontrar no Google. Aqui está a saída que estou recebendo de

sudo apt-get -f install libsdl2-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libsdl2-dev : Depends: libudev-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

e

cat /etc/apt/sources.list
deb http://ftp.belnet.be/ubuntu.com/ubuntu/ xenial multiverse restricted universe main
deb-src http://ftp.belnet.be/ubuntu.com/ubuntu/ xenial multiverse restricted universe main #Added by software-properties

e

cat /etc/apt/sources.list.d/*

# deb http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu xenial main

# deb-src http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu xenial main

# deb http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu xenial main

# deb-src http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu xenial main

# deb http://deb.playonlinux.com/ trusty main

# deb http://deb.playonlinux.com/ trusty main

deb http://packages.ros.org/ros/ubuntu xenial main

# deb http://packages.ros.org/ros/ubuntu xenial main

# deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu xenial main

# deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

# deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu xenial main

# deb-src http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu xenial main

deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu xenial main

# deb-src http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu xenial main

Eu também tentei

y-ppa-manager

e

synaptic

Quando eu tento instalar o libsdl2-dev usando o synaptic, primeiro não há pacotes quebrados, mas quando eu marquei o libsdl2-dev para instalação, ele diz que tenho que primeiro remover pacotes quebrados. Eu tentei o apt-get remover --purge libsdl2-dev, mas como ele não está instalado, ele não pode ser removido.

Eu aprecio toda e qualquer ajuda. Obrigado. Eu sou pós-saída para os comandos que você me dá e permanecerá ativo nesta questão até que possa ser resolvido. Obrigado novamente

EDIT 1:

sudo apt-get install libudev-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libudev-dev : Depends: libudev1 (= 229-4ubuntu4) but 229-4ubuntu6 is to be installed
E: Unable to correct problems, you have held broken packages.

e

sudo apt-get install 229-4ubuntu6
E: Unable to locate package 229-4ubuntu6

e

sudo apt-get install libudev1
libudev1 is already the newest version (229-4ubuntu6).

EDIT 2:

para os comandos

 sudo add-apt-repository XXXXX

eu sempre tenho

XXXXX distribution component is already enabled for all sources.

o resto da seguinte forma

sudo apt update
Hit:1 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu xenial InRelease
Hit:2 http://packages.ros.org/ros/ubuntu xenial InRelease                      
Hit:3 http://ftp.belnet.be/ubuntu.com/ubuntu xenial InRelease                  
Reading package lists... Done                         
Building dependency tree       
Reading state information... Done
All packages are up to date.

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt install libsdl2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsdl2-dev : Depends: libudev-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

EDIÇÃO FINAL:

Este problema está agora resolvido. As etapas finais da minha solução foram ativar os repo de segurança xenial e xenial-update. Depois que eu fiz isso e tentei o sudo apt-get update e o sudo apt-get upgrade eu tive alguns erros baixando algumas atualizações. Depois disso, mudei o meu servidor de download para o servidor principal e executei o update & upgrade, que foi concluído com sucesso. Depois disso eu era ale para instalar com sucesso o libsdl2-dev. Obrigado a doug e ali76 pela ajuda deles!

    
por A.Teator 31.05.2017 / 22:40

1 resposta

0

Não tente este comando:

sudo apt-get install 229-4ubuntu6

E: Unable to locate package 229-4ubuntu6

Porque não há nenhum pacote com 229-4ubuntu6 nome nos repositórios.

A saída apt diz

libudev1 (= 229-4ubuntu4) but 229-4ubuntu6 is to be installed

Isso significa que a versão 229-4ubuntu6 de libudev1 foi instalada, mas a versão 229-4ubuntu4 é necessária.

E a outra coisa é que a última versão de libudev1 para xenial é 229-4ubuntu17 , mas seu apt retorna a última versão é 229-4ubuntu6 . Esse problema aconteceu por causa disso, muitos repositórios do Ubuntu estão desativados em seu sistema e seus repositórios não são atualizados.

Então, como primeiro passo, tentamos habilitar todos os seus repositórios do Ubuntu com estes comandos:

sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse

Em seguida, atualize seus repositórios e seus pacotes:

sudo apt update
sudo apt upgrade

Em seguida, tente consertar pacotes quebrados:

sudo apt -f install

E como último passo tente instalar o libsdl2-dev package:

sudo apt install libsdl2-dev

Atualização: Adicione essas linhas ao seu arquivo /etc/apt/sources.list :

deb http://archive.ubuntu.com/ubuntu xenial universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

E comente estas linhas:

deb http://ftp.belnet.be/ubuntu.com/ubuntu/ xenial multiverse restricted universe main
deb-src http://ftp.belnet.be/ubuntu.com/ubuntu/ xenial multiverse restricted universe main #Added by software-properties

E, em seguida, tente estes comandos para atualizar repositórios e pacotes:

sudo apt update
sudo apt upgrade

Em seguida, tente instalá-lo novamente:

sudo apt install libsdl2-dev
    
por Ali Razmdideh 31.05.2017 / 23:25

Tags