[RESOLVIDO] Falha no apt-get update - Ubuntu 14.04

Iniciado por Julianzbt, 26 de Julho de 2014, 20:18

tópico anterior - próximo tópico

Julianzbt

Olá, recentemente (ontem) migrei do Ubuntu 12.04 para o Ubuntu 14.04.

Estava instalando todos os meus programas via terminal, teclando sempre "sudo apt-get update && upgrade" entre cada instalação. Durante a instalação (se não me engano) do skype, em uma tentativa de "update", apresentou o seguinte problema no terminal:

julianzbt@julianzbt:~$ sudo apt-get update
E: Linha mal formada 57 no arquivo de fontes /etc/apt/sources.list (análise de distribuição)
E: A lista de fontes não pode ser lida.



Reiniciei o PC e nada. Num aviso de erro, que aparece no alto do lado direito apresenta o seguinte:

"O aplicativo Software Updater foi fechado inesperadamente"


Só pra constar, ocorre o mesmo problema com apt-get upgrade....  erro por causa dessa "Linha 57"....

julianzbt@julianzbt:~$ sudo apt-get upgrade
Lendo listas de pacotes... Erro!
E: Linha mal formada 57 no arquivo de fontes /etc/apt/sources.list (análise de distribuição)
E: A lista de fontes não pode ser lida.
E: As listas de pacotes ou os arquivos de estado não puderam ser analisados ou abertos.



Grato







Renan Rischiotto

Olá!

Por que você estava sempre executando os comandos "update" e "upgrade" entre cada instalação dos programas? Se você atualizou o sistema após a instalação, todos os programas já estarão em suas últimas versões (a versão que estiver nos repositórios).

Rode no terminal este comando:

sudo gedit /etc/apt/sources.list

e copie e cole o conteúdo do arquivo aqui.

Use o code (#) do fórum para não ficar grande.

Abraços!

Julianzbt

Opa, faz sentido a questão de "não precisar atualizar a cada instalação"... É que, nas pesquisas que fiz sobre como instalar programas pelo terminal, falavam sempre em atualizar.... Na dúvida atualizava sempre....

Mas vamos lá...

# deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release i386 (20140417)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://br.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://br.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty universe
deb http://br.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://br.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://br.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
deb http://archive.canonical.com/ partner
# deb-src http://archive.canonical.com/ partner
deb http://archive.canonical.com/ trusty partner
# deb-src http://archive.canonical.com/ trusty partner
# deb-src http://archive.canonical.com/ trusty partner
# deb-src http://archive.canonical.com/ trusty partner
# deb-src http://archive.canonical.com/ trusty partner

Renan Rischiotto

#3
Parece que a sua sources.list está meio estranha. Faça o seguinte, apague todo o conteúdo dela e copie e cole este:

# deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://br.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://br.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty universe
deb http://br.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://br.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://br.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://br.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main


Essa é a minha sources.list, sem nenhuma alteração, sem PPA's, apenas com os repositórios de terceiros ativado, sem "proposed" e "backports" ativado.

Só instalei o Google Chrome, que adiciona um repositório (pode-se ver na primeira screenshot), mas eu acho que repositórios não vão pra sources.list e sim pra uma pasta chamada sources.list.d (em /etc/apt), pois ele foi pra essa pasta.

Além disso eu fiz algumas configurações nas atualizações (como pode ver na segunda screenshot), em "Procurar por atualizações automaticamente" deixei como "Nunca", e "Quando houver outras atualizações" deixei como "Exibir imediatamente". Mas creio que isso não afeta a sources.list.

Após colar, rode um sudo apt-get update novamente.

Julianzbt

#4
Olá, poxa legal!! Dessa vez o apt-get update rodou!

O resultado foi esse aqui:

julianzbt@julianzbt-Inspiron-1545:~$ sudo apt-get update
Ign http://dl.google.com stable InRelease
Ign http://br.archive.ubuntu.com trusty InRelease                              
Ign http://br.archive.ubuntu.com trusty-updates InRelease                      
Atingido http://dl.google.com stable Release.gpg                              
Atingido http://br.archive.ubuntu.com trusty Release.gpg                      
Atingido http://br.archive.ubuntu.com trusty-updates Release.gpg              
Ign http://security.ubuntu.com trusty-security InRelease                      
Atingido http://br.archive.ubuntu.com trusty Release                          
Atingido http://dl.google.com stable Release                                  
Atingido http://br.archive.ubuntu.com trusty-updates Release                  
Ign http://archive.canonical.com trusty InRelease                              
Ign http://ppa.launchpad.net trusty InRelease                                  
Ign http://extras.ubuntu.com trusty InRelease                                  
Atingido http://br.archive.ubuntu.com trusty/main Sources                      
Atingido http://security.ubuntu.com trusty-security Release.gpg                
Atingido http://br.archive.ubuntu.com trusty/restricted Sources                
Atingido http://br.archive.ubuntu.com trusty/universe Sources                  
Atingido http://dl.google.com stable/main i386 Packages                        
Atingido http://br.archive.ubuntu.com trusty/multiverse Sources                
Obter:1 http://archive.canonical.com trusty Release.gpg [933 B]                
Atingido http://ppa.launchpad.net trusty Release.gpg                          
Atingido http://extras.ubuntu.com trusty Release.gpg                          
Atingido http://br.archive.ubuntu.com trusty/main i386 Packages                
Atingido http://security.ubuntu.com trusty-security Release                    
Atingido http://br.archive.ubuntu.com trusty/restricted i386 Packages          
Atingido http://br.archive.ubuntu.com trusty/universe i386 Packages            
Atingido http://br.archive.ubuntu.com trusty/multiverse i386 Packages          
Atingido http://br.archive.ubuntu.com trusty/main Translation-pt_BR            
Obter:2 http://archive.canonical.com trusty Release [8.257 B]                  
Atingido http://security.ubuntu.com trusty-security/main Sources              
Atingido http://ppa.launchpad.net trusty Release                              
Atingido http://extras.ubuntu.com trusty Release                              
Atingido http://br.archive.ubuntu.com trusty/main Translation-pt              
Atingido http://br.archive.ubuntu.com trusty/main Translation-en              
Atingido http://br.archive.ubuntu.com trusty/multiverse Translation-pt_BR      
Atingido http://security.ubuntu.com trusty-security/restricted Sources        
Atingido http://br.archive.ubuntu.com trusty/multiverse Translation-pt        
Atingido http://extras.ubuntu.com trusty/main Sources                          
Atingido http://security.ubuntu.com trusty-security/universe Sources          
Obter:3 http://archive.canonical.com trusty/partner Sources [7.014 B]          
Atingido http://br.archive.ubuntu.com trusty/multiverse Translation-en        
Atingido http://extras.ubuntu.com trusty/main i386 Packages                    
Atingido http://security.ubuntu.com trusty-security/multiverse Sources        
Atingido http://br.archive.ubuntu.com trusty/restricted Translation-pt_BR      
Atingido http://br.archive.ubuntu.com trusty/restricted Translation-pt        
Atingido http://br.archive.ubuntu.com trusty/restricted Translation-en        
Atingido http://br.archive.ubuntu.com trusty/universe Translation-pt_BR        
Atingido http://security.ubuntu.com trusty-security/main i386 Packages        
Atingido http://br.archive.ubuntu.com trusty/universe Translation-pt          
Atingido http://br.archive.ubuntu.com trusty/universe Translation-en          
Atingido http://ppa.launchpad.net trusty/main i386 Packages                    
Atingido http://br.archive.ubuntu.com trusty-updates/main Sources              
Atingido http://security.ubuntu.com trusty-security/restricted i386 Packages  
Obter:4 http://archive.canonical.com trusty/partner i386 Packages [5.803 B]    
Atingido http://br.archive.ubuntu.com trusty-updates/restricted Sources        
Atingido http://br.archive.ubuntu.com trusty-updates/universe Sources          
Atingido http://br.archive.ubuntu.com trusty-updates/multiverse Sources        
Atingido http://security.ubuntu.com trusty-security/universe i386 Packages    
Atingido http://security.ubuntu.com trusty-security/multiverse i386 Packages  
Atingido http://br.archive.ubuntu.com trusty-updates/main i386 Packages        
Atingido http://br.archive.ubuntu.com trusty-updates/restricted i386 Packages  
Atingido http://security.ubuntu.com trusty-security/main Translation-en        
Ign http://dl.google.com stable/main Translation-pt_BR                        
Atingido http://br.archive.ubuntu.com trusty-updates/universe i386 Packages    
Atingido http://br.archive.ubuntu.com trusty-updates/multiverse i386 Packages  
Ign http://dl.google.com stable/main Translation-pt                            
Atingido http://br.archive.ubuntu.com trusty-updates/main Translation-en      
Ign http://dl.google.com stable/main Translation-en                            
Atingido http://security.ubuntu.com trusty-security/multiverse Translation-en  
Atingido http://br.archive.ubuntu.com trusty-updates/multiverse Translation-en
Atingido http://br.archive.ubuntu.com trusty-updates/restricted Translation-en
Atingido http://br.archive.ubuntu.com trusty-updates/universe Translation-en  
Atingido http://security.ubuntu.com trusty-security/restricted Translation-en  
Ign http://extras.ubuntu.com trusty/main Translation-pt_BR                    
Ign http://ppa.launchpad.net trusty/main Translation-pt_BR                    
Ign http://extras.ubuntu.com trusty/main Translation-pt                        
Atingido http://security.ubuntu.com trusty-security/universe Translation-en    
Ign http://ppa.launchpad.net trusty/main Translation-pt                        
Ign http://extras.ubuntu.com trusty/main Translation-en                        
Ign http://ppa.launchpad.net trusty/main Translation-en                        
Ign http://archive.canonical.com trusty/partner Translation-pt_BR              
Ign http://archive.canonical.com trusty/partner Translation-pt                
Ign http://archive.canonical.com trusty/partner Translation-en                
Ign http://br.archive.ubuntu.com trusty-updates/main Translation-pt_BR        
Ign http://br.archive.ubuntu.com trusty-updates/main Translation-pt            
Ign http://br.archive.ubuntu.com trusty-updates/multiverse Translation-pt_BR  
Ign http://br.archive.ubuntu.com trusty-updates/multiverse Translation-pt      
Ign http://br.archive.ubuntu.com trusty-updates/restricted Translation-pt_BR  
Ign http://br.archive.ubuntu.com trusty-updates/restricted Translation-pt      
Ign http://br.archive.ubuntu.com trusty-updates/universe Translation-pt_BR    
Ign http://br.archive.ubuntu.com trusty-updates/universe Translation-pt        
Ign http://security.ubuntu.com trusty-security/main Translation-pt_BR          
Ign http://security.ubuntu.com trusty-security/main Translation-pt            
Ign http://security.ubuntu.com trusty-security/multiverse Translation-pt_BR    
Ign http://security.ubuntu.com trusty-security/multiverse Translation-pt      
Ign http://security.ubuntu.com trusty-security/restricted Translation-pt_BR    
Ign http://security.ubuntu.com trusty-security/restricted Translation-pt      
Ign http://security.ubuntu.com trusty-security/universe Translation-pt_BR      
Ign http://security.ubuntu.com trusty-security/universe Translation-pt        
Baixados 22,0 kB em 12s (1.819 B/s)                                            
Lendo listas de pacotes... Pronto
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: Você terá que executar apt-get update para corrigir estes problemas


Em princípio não sabia com resolver esse problema de "W: Duplicate sources.list entry......etc". Sou novo no mundo do Terminal e sei que esse é um problema recorrente dizendo que necessito "executar apt-get update para corrigir estes problemas" , sendo que isso quase sempre NÃO ajuda a corrigi-lo.

Pesquisei e descobri que podemos resolver essa questão de repositórios duplicados no "Programas e atualizações", simplesmente desmarcando os repetidos.

Valeu a atenção Renan

Renan Rischiotto

#5
Que bom! Fico feliz que tenha conseguido! :)

CitarPesquisei e descobri que podemos resolver essa questão de repositórios duplicados no "Programas e atualizações", simplesmente desmarcando os repetidos.

Sim, você pode excluir também um deles.

CitarEm princípio não sabia com resolver esse problema de "W: Duplicate sources.list entry......etc". Sou novo no mundo do Terminal e sei que esse é um problema recorrente dizendo que necessito "executar apt-get update para corrigir estes problemas" , sendo que isso quase sempre NÃO ajuda a corrigi-lo.

Não sei por que o terminal pede para rodar o "update" para corrigir, sendo que esse comando é para atualizar a lista de repositórios e não para corrigir coisas rsrs
Eu acho que removendo pelo arquivo sources.list também funciona (mas daí teria que localizar a linha/entrada e apagar)

Abraços!