Rabu, 01 Agustus 2018

Memperbaiki error libperl5.22 di Ubuntu 16.04 yang menyebabkan tidak bisa update



Kali ini saya menemukan error di server linux ubuntu 16.04 saya, ketika akan melakukan update linux dari repository, muncul error berikut :

# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libperl5.22 : Breaks: libperl5.22:i386 (!= 5.22.1-9ubuntu0.2) but 5.22.1-9ubuntu0.5 is installed
 libperl5.22:i386 : Breaks: libperl5.22 (!= 5.22.1-9ubuntu0.5) but 5.22.1-9ubuntu0.2 is installed
 perl : Depends: libperl5.22 (= 5.22.1-9ubuntu0.5) but 5.22.1-9ubuntu0.2 is installed
E: Unmet dependencies. Try using -f.

Disana kita diminta untuk melakukan command apt-get -f install untuk mengatasi masalah diatas :

# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libperl5.22
The following packages will be upgraded:
  libperl5.22
1 upgraded, 0 newly installed, 0 to remove and 164 not upgraded.
4 not fully installed or removed.
Need to get 0 B/3,396 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up perl-base (5.22.1-9ubuntu0.5) ...
(Reading database ... 102067 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.5_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.2) ...
dpkg: error processing archive /var/cache/apt/archives/libperl5.22_5.22.1-9ubuntu0.5_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libperl5.22_5.22.1-9ubuntu0.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Tenyata masih tidak bisa dan malah muncul error yang baru seperti diatas, solusi nya dalah kita move dulu file yang bermasalah nya, yaitu :

trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz

Cara nya adalah jalankan perintah berikut ini :

# mv /usr/share/doc/libperl5.22/changelog.Debian.gz /usr/share/doc/libperl5.22/changelog.Debian.gz.bak

Kemudian coba lagi command apt-get -f install nya :

# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libperl5.22
The following packages will be upgraded:
  libperl5.22
1 upgraded, 0 newly installed, 0 to remove and 164 not upgraded.
3 not fully installed or removed.
Need to get 0 B/3,396 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 102067 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.5_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up perl-modules-5.22 (5.22.1-9ubuntu0.5) ...
Setting up libperl5.22:amd64 (5.22.1-9ubuntu0.5) ...
Setting up libperl5.22:i386 (5.22.1-9ubuntu0.5) ...
Setting up perl (5.22.1-9ubuntu0.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...

Setelah itu baru bisa dicoba update lagi :

# apt upgrade


Semoga bermanfaat untuk pembaca semua.

Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 40017

Tidak ada komentar: