não pode instalar o lvm2 no ubuntu 16.04

0

Estou tentando expandir o tamanho de uma das máquinas virtuais que uso. Por esse motivo, preciso instalar o comando pvcreate para poder criar um volume físico.

Quando tento instalá-lo, recebo os seguintes erros:

Notas:

Lendo a saída e procurando por algumas informações e outras perguntas como essa, eu entendo que preciso atualizar o sistema operacional, mas não consigo fazer isso.

Erros que encontrei:

1) "O dpkg foi interrompido, você deve executar manualmente 'sudo dpkg --configure -a' para corrigir o problema." (resolvido)

2) Sistema de arquivos somente leitura

3) "Inconsistência inesperada. Execute o fsck manualmente." (resolvido executando o comando 'fsck -M / dev / sda1'; '/ dev / sda1' é onde minha raiz é montada)

Coisas que tentei:

1) link

Nota: Antes de atualizar eu marquei como hold alguns pacotes relacionados ao mariadb para evitar alguns conflitos devido a dependências não satisfeitas quando atualizando.

Saída:

rafa@ubuntu:~$ sudo apt update
Hit:1 http://tedeco.fi.upm.es/mirror/mariadb/repo/10.0/ubuntu xenial 
InRelease
Hit:2 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]                                                   
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease                                                                   
Ign:5 http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntu trusty InRelease                                  
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 
kB]                               
Err:7 http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntu trusty Release              
404  Not Found
Get:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 
kB]       
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 
Metadata [67.7 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 
Icons [72.3 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 
DEP- 
11 Metadata [108 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 
64x64 Icons [150 kB]                         
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP- 
11 Metadata [320 kB]                    
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 
64x64 Icons [231 kB]                                               
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 
DEP-11 Metadata [247 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 
64x64 Icons [333 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 
DEP-11 Metadata [5,960 B]
Get:18 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP- 
11 64x64 Icons [14.3 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu xenial-backports/main amd64 
DEP-11 Metadata [3,328 B]
Get:20 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 
DEP-11 Metadata [5,104 B]
Reading package lists... Done                                                
E: The repository 'http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntu 
trusty Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.
rafa@ubuntu:~$ sudo apt-mark hold mariadb*

mariadb-common set on hold.
mariadb-client-10.0 set on hold.
mariadb-server set on hold.
mariadb-client set on hold.
mariadb-client-core-10.0 set on hold.
mariadb-server-10.0 set on hold.
mariadb-plugin-connect set on hold.
mariadb-galera-server-10.0 set on hold.
mariadb-connect-engine-10.0 set on hold.
mariadb-plugin-mroonga set on hold.
mariadb-plugin-oqgraph set on hold.
mariadb-oqgraph-engine-10.0 set on hold.
mariadb-plugin-spider set on hold.
mariadb-plugin-tokudb set on hold.
mariadb-server-core-10.0 set on hold.
mariadb-galera-server set on hold.
mariadb-test set on hold.
mariadb-test-data set on hold.
mariadb-test-10.0 set on hold.
mariadb-galera-test set on hold.
mariadb-galera-test-10.0 set on hold.
mariadb-client-10.0-dbgsym set on hold.
mariadb-client-core-10.0-dbgsym set on hold.
mariadb-connect-engine-10.0-dbgsym set on hold.
mariadb-galera-server-10.0-dbgsym set on hold.
mariadb-galera-test-10.0-dbgsym set on hold.
mariadb-oqgraph-engine-10.0-dbgsym set on hold.
mariadb-server-10.0-dbgsym set on hold.
mariadb-server-core-10.0-dbgsym set on hold.
mariadb-test-10.0-dbgsym set on hold.

rafa@ubuntu:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer 
required:
libllvm4.0
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  libdrm-common libllvm6.0 libqmi-glib5
The following packages have been kept back:
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common mariadb- 
  server mariadb-server-10.0 mariadb-server-core-10.0
The following packages will be upgraded:
  amd64-microcode apparmor appstream apt apt-transport-https apt-utils 
  avahi-autoipd avahi-daemon avahi-utils base-files bind9-host binutils 
  bsdutils console-setup console-setup-linux
  desktop-file-utils dnsutils dpkg fonts-opensymbol friendly-recovery 
  fwupd fwupdate fwupdate-signed ghostscript ghostscript-x gir1.2- 
  gdkpixbuf-2.0 gir1.2-packagekitglib-1.0
  gnome-accessibility-themes gnome-software gnome-software-common gnome- 
  themes-standard gnome-themes-standard-data grub-common grub-pc grub-pc- 
  bin grub2-common gtk2-engines-pixbuf gvfs
  gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs 
  hdparm hicolor-icon-theme ifupdown initramfs-tools initramfs-tools-bin 
  initramfs-tools-core iproute2 isc-dhcp-client
  isc-dhcp-common keyboard-configuration klibc-utils libapparmor-perl 
  libapparmor1 libappstream-glib8 libappstream3 libapt-inst2.0 libapt- 
  pkg5.0 libaudit-common libaudit1 libavahi-client3
  libavahi-common-data libavahi-common3 libavahi-core7 libavahi-glib1 
  libbind9-140 libblkid1 libcryptsetup4 libdfu1 libdns-export162 libdns162 
  libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2
  libdrm-radeon1 libdrm2 libegl1-mesa libfdisk1 libfwup0 libfwupd1 libgbm1 
  libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa- 
  glx libglapi-mesa libglib2.0-0
  libglib2.0-bin libglib2.0-data libgnutls-openssl27 libgnutls30 libgs9     
  libgs9-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libisc- 
  export160 libisc160 libisccc140 libisccfg140 libklibc
  liblcms2-2 liblcms2-utils libldap-2.4-2 liblwres141 libmbim-glib4 
  libmbim-proxy libmm-glib0 libmount1 libnm-glib-vpn1 libnm-glib4 libnm- 
  gtk-common libnm-gtk0 libnm-util2 libnm0
  libnma-common libnma0 libopencv-core2.4v5 libopencv-imgproc2.4v5 
  libpackagekit-glib2-16 libpam-modules libpam-modules-bin libpam-runtime 
  libpam-systemd libpam0g libparted2 libpci3
  libplymouth4 libpulse-mainloop-glib0 libpulse0 libpulsedsp libpython- 
  stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libqmi- 
  proxy libreoffice-base-core libreoffice-calc
  libreoffice-common libreoffice-core libreoffice-gtk libreoffice-math 
  libreoffice-style-elementary libreoffice-style-galaxy libreoffice-writer 
  libseccomp2 libslang2 libsmartcols1
  libsmbclient libsnapd-glib1 libsnmp-base libsnmp30 libsystemd0 libudev1 
  libunity-protocol-private0 libunity-scopes-json-def-desktop libunity9 
  libuuid1 libva1 libwayland-egl1-mesa
  libxatracker2 linux-firmware linux-libc-dev logrotate lshw mesa-vdpau- 
  drivers modemmanager mount mysql-common network-manager network-manager- 
  gnome oracle-java8-installer
  oracle-java8-set-default parted pciutils plymouth plymouth-label 
  plymouth-theme-ubuntu-text pulseaudio pulseaudio-module-x11 pulseaudio- 
  utils python python-apt-common python-minimal
  python2.7 python2.7-minimal python3-apt python3-uno python3-update- 
  manager python3-urllib3 resolvconf rfkill samba-libs shared-mime-info 
  snapd snapd-login-service squashfs-tools systemd
  systemd-sysv ubuntu-core-launcher ubuntu-minimal ubuntu-mono ubuntu- 
  standard udev unattended-upgrades uno-libs3 update-manager update- 
  manager-core update-notifier update-notifier-common
  ure util-linux uuid-runtime va-driver-all wireless-regdb x11-common xdg- 
  user-dirs xorg xserver-common xserver-xorg-core-hwe-16.04 xserver-xorg- 
  legacy-hwe-16.04
  xserver-xorg-video-amdgpu-hwe-16.04 xserver-xorg-video-ati-hwe-16.04 
  xserver-xorg-video-intel-hwe-16.04 xserver-xorg-video-nouveau-hwe-16.04 
  xserver-xorg-video-radeon-hwe-16.04
  230 upgraded, 3 newly installed, 0 to remove and 6 not upgraded.
  Need to get 213 MB/223 MB of archives.
  After this operation, 123 MB of additional disk space will be used.
  Do you want to continue? [Y/n] Y

  ...
  (All the Get requests)
  ...

  Fetched 213 MB in 8min 44s (406 kB/s)                                                                                                                                                          
  Extracting templates from packages: 100%
  Preconfiguring packages ...
  setting xserver-xorg-legacy/xwrapper/allowed_users from configuration 
  file
  dpkg: unrecoverable fatal error, aborting:
  unable to open files list file for package 'linux-headers-generic-hwe- 
  16.04': Structure needs cleaning
  touch: cannot touch '/var/lib/update-notifier/dpkg-run-stamp': Read-only 
  file system
  E: Sub-process /usr/bin/dpkg returned an error code (2)
  W: Problem unlinking the file /var/cache/apt/pkgcache.bin - 
  pkgDPkgPM::Go (30: Read-only file system)

A parte mais importante é a última:

  dpkg: unrecoverable fatal error, aborting:
  unable to open files list file for package 'linux-headers-generic-hwe- 
  16.04': Structure needs cleaning
  touch: cannot touch '/var/lib/update-notifier/dpkg-run-stamp': Read-only 
  file system
  E: Sub-process /usr/bin/dpkg returned an error code (2)
  W: Problem unlinking the file /var/cache/apt/pkgcache.bin - 
  pkgDPkgPM::Go (30: Read-only file system)

2) Reinicie

3) Instale o pacote linux-headers-4.15.0-34-generic

4) Instale o pacote linux-headers-generic-hwe-16.04

5) Instale o pacote linux-modules-4.15.0-generic

6) Reinstale esses pacotes usando o comando 'sudo apt / apt-get install --reinstall package_name'

7) Eu verifiquei qualquer coisa que eu tente fazer com o comando apt / apt-get, não consigo desinstalar alguns pacotes sem receber o erro 'Read only file system'.

Exemplo: Para remover o pacote snapd:

(reportingApp) rafa@ubuntu:~/Documents/projects/reporting/reporting_project$ 
sudo apt-get autoremove --purge snapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  snapd* ubuntu-core-launcher*
0 upgraded, 0 newly installed, 2 to remove and 234 not upgraded.
After this operation, 57.9 MB disk space will be freed.
Do you want to continue? [Y/n] Y
dpkg: unrecoverable fatal error, aborting:
  unable to open files list file for package 'linux-headers-generic-hwe- 
16.04': Structure needs cleaning
touch: cannot touch '/var/lib/update-notifier/dpkg-run-stamp': Read-only file 
system
E: Sub-process /usr/bin/dpkg returned an error code (2)
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - pkgDPkgPM::Go 
(30: Read-only file system)

Como posso resolver este erro?

    
por Rafael VC 25.09.2018 / 17:18

0 respostas

Tags