Autor Tópico: Erro ao realizar atualizações ou novas instalações com apt-get e no terminal  (Lida 4701 vezes)

Offline bnascimento

  • Usuário Ubuntu
  • *
  • Mensagens: 33
    • Ver perfil
Estou com o UBUNTU 14.04. Já tentei os comandos:
sudo apt-get clean
sudo apt-get update
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get upgrade

Nada faz com que meu apt-get volte a funcionar.
Segue abaixo a parte final do comando  sudo dpkg --configure -a

dpkg: error processing package linux-generic-lts-vivid (--configure):
 problemas de dependência - deixando desconfigurado
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
/usr/sbin/update-initramfs: 250: /usr/sbin/update-initramfs: basename: not found
dpkg: error processing package initramfs-tools (--configure):
 sub-processo script post-installation instalado retornou estado de saída de erro 127
Erros foram encontrados durante o processamento de:
 systemd-services
 grub-pc-bin
 indicator-session
 libpam-systemd:amd64
 gnome-menus
 linux-image-3.19.0-30-generic
 google-chrome-stable
 grub-pc
 linux-image-3.19.0-31-generic
 linux-image-3.13.0-66-generic
 php5-cli
 libapache2-mod-php5
 php5
 grub2-common
 network-manager-gnome
 apport
 apport-gtk
 linux-image-extra-3.19.0-30-generic
 linux-image-generic-lts-vivid
 linux-image-generic
 linux-image-extra-3.19.0-31-generic
 grub-gfxpayload-lists
 linux-image-extra-3.13.0-66-generic
 linux-generic
 linux-generic-lts-vivid
 initramfs-tools
« Última modificação: 28 de Outubro de 2015, 10:39 por bnascimento »

Offline selvaking

  • Equipe Ubuntu
  • Usuário Ubuntu
  • *****
  • Mensagens: 1.171
  • Parque Anchieta - Rio de Janeiro - RJ
    • Ver perfil
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #1 Online: 27 de Outubro de 2015, 10:58 »
saida do comando:
Código: [Selecionar]
cat /etc/apt/sources.list
Dê-me um computador com o Tux que movo o mundo!

Linux User #323049

Offline bnascimento

  • Usuário Ubuntu
  • *
  • Mensagens: 33
    • Ver perfil
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #2 Online: 27 de Outubro de 2015, 12:05 »
Ao abrir o terminal já inicia com o erro:
/usr/bin/lesspipe: 1: /usr/bin/lesspipe: basename: not found
/usr/bin/lesspipe: 295: [: =: unexpected operator

Offline bnascimento

  • Usuário Ubuntu
  • *
  • Mensagens: 33
    • Ver perfil
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #3 Online: 27 de Outubro de 2015, 12:06 »
saida do comando:
Código: [Selecionar]
cat /etc/apt/sources.list

Segue a saída do comando

bnascimento@UBUNTU-BRUNO:~$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted

# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ vivid 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

paulinho1971

  • Visitante
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #4 Online: 27 de Outubro de 2015, 14:41 »
Quer ver nós acharmos? Faça assim:

No terminal:
Código: [Selecionar]
cd /etc/apt/sources.list.d
Enter

Código: [Selecionar]
ls -la
Enter

O que aparecer no seu terminal copie de lá e cole aqui, o meu como exemplo:
Código: [Selecionar]
creto1@creto1:/etc/apt/sources.list.d$ ls -la
total 8
drwxr-xr-x 2 root root 4096 Abr 10  2014 .
drwxr-xr-x 6 root root 4096 Out 27 08:45 ..
creto1@creto1:/etc/apt/sources.list.d$

T+

Offline bnascimento

  • Usuário Ubuntu
  • *
  • Mensagens: 33
    • Ver perfil
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #5 Online: 27 de Outubro de 2015, 16:17 »
Quer ver nós acharmos? Faça assim:

No terminal:
Código: [Selecionar]
cd /etc/apt/sources.list.d
Enter

Código: [Selecionar]
ls -la
Enter

O que aparecer no seu terminal copie de lá e cole aqui, o meu como exemplo:
Código: [Selecionar]
creto1@creto1:/etc/apt/sources.list.d$ ls -la
total 8
drwxr-xr-x 2 root root 4096 Abr 10  2014 .
drwxr-xr-x 6 root root 4096 Out 27 08:45 ..
creto1@creto1:/etc/apt/sources.list.d$

T+


Segue a saída:

Código: [Selecionar]
root@UBUNTU-BRUNO:/# cd /etc/apt/sources.list.d
root@UBUNTU-BRUNO:/etc/apt/sources.list.d# ls -la
total 28
drwxr-xr-x 2 root root 4096 Ago 22 13:45 .
drwxr-xr-x 6 root root 4096 Out 13 00:59 ..
-rw-r--r-- 1 root root  170 Ago 22 13:45 danielrichter2007-grub-customizer-trusty.list
-rw-r--r-- 1 root root  176 Ago 22 13:45 google-chrome.list
-rw-r--r-- 1 root root  176 Ago 22 13:45 google-chrome.list.save
-rw-r--r-- 1 root root  148 Ago 22 13:45 yannubuntu-boot-repair-trusty.list
-rw-r--r-- 1 root root  148 Ago 22 13:45 yannubuntu-boot-repair-trusty.list.save

paulinho1971

  • Visitante
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #6 Online: 27 de Outubro de 2015, 19:14 »
Bem se não for nenhum dessas linhas ainda há uma nova pergunta, pois se você está num ubuntu 14.04 Trusty até onde deu para perceber, o que é que esse kernel esta fazendo ai:

linux-generic-lts-vivid

Não sei se pode ser isso mas que pode ser a causa desse amontoado de erros apresentado pelo terminal

Citar
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
/usr/sbin/update-initramfs: 250: /usr/sbin/update-initramfs: basename: not found
dpkg: error processing package initramfs-tools (--configure):

Tenho pouca experiência, mas vamos continuar tentando, vamos olhar esses kerneis instalados e esperar por uma opinião de alguém experiente:

Código: [Selecionar]
dpkg --get-selections | grep linux-image
E também:
Código: [Selecionar]
dpkg --get-selections | grep linux-headers
Mas você não lembra o que estava fazendo antes desse problema aparecer?

T+

Offline bnascimento

  • Usuário Ubuntu
  • *
  • Mensagens: 33
    • Ver perfil
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #7 Online: 27 de Outubro de 2015, 23:46 »
Bem se não for nenhum dessas linhas ainda há uma nova pergunta, pois se você está num ubuntu 14.04 Trusty até onde deu para perceber, o que é que esse kernel esta fazendo ai:

linux-generic-lts-vivid

Não sei se pode ser isso mas que pode ser a causa desse amontoado de erros apresentado pelo terminal

Citar
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
/usr/sbin/update-initramfs: 250: /usr/sbin/update-initramfs: basename: not found
dpkg: error processing package initramfs-tools (--configure):

Tenho pouca experiência, mas vamos continuar tentando, vamos olhar esses kerneis instalados e esperar por uma opinião de alguém experiente:

Código: [Selecionar]
dpkg --get-selections | grep linux-image
E também:
Código: [Selecionar]
dpkg --get-selections | grep linux-headers
Mas você não lembra o que estava fazendo antes desse problema aparecer?

T+

Segue a saída:
Código: [Selecionar]
/usr/bin/lesspipe: 1: /usr/bin/lesspipe: basename: not found
/usr/bin/lesspipe: 295: [: =: unexpected operator
bnascimento@UBUNTU-BRUNO:~$ dpkg --get-selections | grep linux-image
linux-image-3.13.0-65-generic install
linux-image-3.13.0-66-generic install
linux-image-3.19.0-25-generic install
linux-image-3.19.0-26-generic install
linux-image-3.19.0-28-generic install
linux-image-3.19.0-30-generic install
linux-image-3.19.0-31-generic install
linux-image-extra-3.13.0-66-generic install
linux-image-extra-3.19.0-25-generic install
linux-image-extra-3.19.0-26-generic install
linux-image-extra-3.19.0-28-generic install
linux-image-extra-3.19.0-30-generic install
linux-image-extra-3.19.0-31-generic install
linux-image-generic install
linux-image-generic-lts-vivid install
bnascimento@UBUNTU-BRUNO:~$ dpkg --get-selections | grep linux-headers
linux-headers-3.13.0-65 install
linux-headers-3.13.0-65-generic install
linux-headers-3.13.0-66 install
linux-headers-3.13.0-66-generic install
linux-headers-3.19.0-25 install
linux-headers-3.19.0-25-generic install
linux-headers-3.19.0-26 install
linux-headers-3.19.0-26-generic install
linux-headers-3.19.0-28 install
linux-headers-3.19.0-28-generic install
linux-headers-3.19.0-30 install
linux-headers-3.19.0-30-generic install
linux-headers-3.19.0-31 install
linux-headers-3.19.0-31-generic install
linux-headers-generic install
linux-headers-generic-lts-vivid install

Sobre o problema... eu acho que foi depois de restaurar o kernel. Tenho um sistema dual boot com win 10. E o win detonou o grub com uma atualização automática. Tive que restarar com o Live USB. Mas... não estou certo se o problema ocasionado por isso.
Sobre o Kernel que mencionou não sei responder.

Offline bnascimento

  • Usuário Ubuntu
  • *
  • Mensagens: 33
    • Ver perfil
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #8 Online: 28 de Outubro de 2015, 10:34 »
Em algumas pesquisas encontrei ubuntuforums.org/archive/index.php/t-1924720.html

Resolvi parte do problema (erro no terminal) com o comando:
Código: [Selecionar]
sudo apt-get install --reinstall coreutils

Os erros agora estão restritos aos pacotes do php5.

Abaixo segue a parte final do comando:

Código: [Selecionar]

sudo dpkg --configure -a

Erros foram encontrados durante o processamento de:
php5-common
php5-cli
libapache2-mod-php5
php5-readline
php5-mysql
php5-cgi php5-gd

Solucionei esse último problema com:

Código: [Selecionar]
rm -frv /var/lib/dpkg/info/*.*;
apt-get install -y -f
« Última modificação: 28 de Outubro de 2015, 10:38 por bnascimento »

paulinho1971

  • Visitante
Re:Erro ao realizar atualizações ou novas instalações com apt-get e no terminal
« Resposta #9 Online: 28 de Outubro de 2015, 11:28 »
Fico feliz por ter conseguido sozinho encontrar a solução amigo e ainda mais por voltar e nos dar seu feedback!

Att,
paulinho1971

T+