Manjaro system update/upgrade fails

If you are facing below errors when you upgrading Manjaro linux or updating any software package, don’t worry the below list of commands will solve your headache issue. Then you can do upgrade or update anything on your Manjaro box…to keep smaile..)

1) “Unable to lock database” Error

When downloading and installing software from the repositories on manjaro linux you will get this error message due to database lock file, which was created by default to ensure currently installation process is going on. If more then one attempt happen you will get this kind of error message. If so, just remove the lock file and go ahead.

# Unable to lock database - Error #
root@2daygeek [~]# sudo pacman -Syu
:: Synchronizing package databases...
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update multilib (unable to lock database)
error: failed to synchronize any databases
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck

# Unable to lock database - Solution #
root@2daygeek [~]# rm -Rf /var/lib/pacman/db.lck

2) error: failed retrieving file ‘core.db’

If the mirror files don’t have the proper mirror server list (any of the mirror server listed) which is lead to get the above error message. Just do updage the mirror server list once again to get solve the issue

# error : failed retrieving file 'core.db'
root@2daygeek [~]# sudo pacman -Syu
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from ftp.lug.ro : Resolving timed out after 10518 milliseconds
error: failed retrieving file 'core.db' from mirror.dacentec.com : Resolving timed out after 10519 milliseconds
error: failed retrieving file 'core.db' from manjaro.mirrors.uk2.net : Resolving timed out after 10517 milliseconds
error: failed retrieving file 'core.db' from mirror.yandex.ru : Resolving timed out after 10516 milliseconds
error: failed retrieving file 'core.db' from repo.manjaro.org.uk : Resolving timed out after 10517 milliseconds
error: failed retrieving file 'core.db' from ftp.lysator.liu.se : Resolving timed out after 10516 milliseconds
error: failed retrieving file 'core.db' from mirror.catn.com : Resolving timed out after 10516 milliseconds
error: failed retrieving file 'core.db' from mirror.jmu.edu : Resolving timed out after 10516 milliseconds
error: failed retrieving file 'core.db' from vm1.sorch.info : Resolving timed out after 10515 milliseconds
error: failed retrieving file 'core.db' from mirror.zetup.net : Resolving timed out after 10515 milliseconds
error: failed retrieving file 'core.db' from mirror3.layerjet.com : Resolving timed out after 10514 milliseconds
error: failed retrieving file 'core.db' from manjaro.mirror.serversaustralia.com.au : Resolving timed out after 10514 milliseconds
.
.
# Solution : failed retrieving file 'core.db'
root@2daygeek [~]# pacman-mirrors -g
:: Querying servers, this may take some time...
Africa
-> 2.507 http://manjaro.mirror.ac.za/stable/$repo/$arch
-> 1.583 http://mirror.is.co.za/mirrors/manjaro.org/stable/$repo/$arch
Australia
-> 1.571 http://mirror.ventraip.net.au/Manjaro/stable/$repo/$arch
-> 1.237 http://manjaro.mirror.serversaustralia.com.au/stable/$repo/$arch
.
.

3) “Failed to commit transaction (invalid or corrupted package)” Error

Who ever developing the software package they have encrypted codes (signature keys) to avoid the malicious transaction whenever anyone trying to download the software packages from repositories. During the installation process, once any software packages have been downloaded, your system will first check their signature keys to ensure that they are authentic prior to actually installing them. If a signature key cannot be verified you will get above error message. If so, use the below command to download necessary signature key files to get solve the issue.

# error : invalid or corrupted package'
root@2daygeek [~]# sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Packages (1) manjaro-system-20150804-1
:: Starting full system upgrade...
.
.
Total Download Size:    319.92 MiB
Total Installed Size:  3452.33 MiB
Net Upgrade Size:       217.86 MiB
.
.
:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
.
.
error: manjaro-printer: signature from "Bernhard Landauer " is marginal trust
:: File /var/cache/pacman/pkg/manjaro-printer-2015.06-2-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: os-prober: signature from "Bernhard Landauer " is marginal trust
:: File /var/cache/pacman/pkg/os-prober-1.66-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

# Solution : invalid or corrupted package'
root@2daygeek [~]# pacman -S manjaro-keyring
resolving dependencies...
looking for conflicting packages...

Packages (1) manjaro-keyring-20150712-1

Total Installed Size:  0.06 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
(1/1) upgrading manjaro-keyring                    [######################] 100%
==> Appending keys from manjaro.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signing key 7C89F4D439B2BFACF425107B62443D89B35859F8...
  -> Locally signing key 5A97ED6B72418199F0C22B23137C934B5DCB998E...
  -> Locally signing key FAA6840E8C3FC7F89BEE0DC8AC7AB10BCB6CDD17...
  -> Locally signing key B4663188A692DB1E45A98EE95BD96CC4247B52CC...
usr/bin/pacman-key: line 609: printf: write error: Broken pipe
  -> Locally signing key 540DE7083B89314CF70EA6F0C1B1AD0DA80EBF3E...
  -> Locally signing key 35B4FF23EA9477582C2A0AF12B80869C5C0102A6...
  -> Locally signing key 1E7908935AAB9A00D6B47503363DFFFD59152F77...
  -> Locally signing key 77DC01C9971AC3C39A0626F72C089F09AC97B894...
  -> Locally signing key 74C2F2CC05A0AB7D859839938934292D604F8BA2...
  -> Locally signing key 39F0EC1AE50B37E5F3196F09DAD3B211663CA268...
  -> Locally signing key E4CDFE50A2DA85D58C8A8C70CAA6A59611C7F07E...
==> Importing owner trust values...
gpg: setting ownertrust to 4
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:  16  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  16  signed:  62  trust: 0-, 0q, 0n, 16m, 0f, 0u
gpg: depth: 2  valid:  60  signed:   5  trust: 60-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2015-12-14

Now, finally i can able to upgrade the system to latest version…keep smile…)

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

Your email address will not be published. Required fields are marked *