Error gpgme error no data

When I finally decided to upgrade my laptop running vanilla Arch Linux (because of internet problems) I kept on getting errors like this: $ sudo pacman -Syu :: Synchronizing package databases......

The following worked for me.

sudo rm -rf /etc/pacman.d/gnupg /var/lib/pacman/sync
sudo pacman-key --init 
sudo pacman -Syyu

The last command hit errors at

checking keys in keyring

error: key "6D42BDD116E0068F" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)

We’ve to update the archlinux-keyring package to remedy this

sudo pacman -S archlinux-keyring

However, this presented the chicken-egg problem. We need the package to validate other packages, but its own package is now outdated too. The above command downloads archlinux-keyring-yyymmdd.pkg.tar.zst; unable to validate, rejects it. There’s a prompt question about the failure, after which irrespective of the answer the downloaded package gets deleted.

Without answering to the prompt, I opened another terminal window and copied the downloaded package. Dismissed the prompt in the previous terminal and manually installed the copied package.

cp /var/cache/pacman/pkg/archlinux-keyring-20220713-1-any.pkg.tar.zst ~/tmp/
sudo pacman -U ~/tmp/archlinux-keyring-20220713-1-any.pkg.tar.zst

Now things work fine when I go sudo pacman -Syu as usual.

Hello, I have recently been getting an error when attempting to download or update any package within pacman.  This has occured universally with several different network connections within different locations, and is preventing me from installing or updating anything using pacman.  I have tried resetting the pacman keyring and using a different mirror, but nothing has changed so far.

Here is my pacman -Syu output:

error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
:: Synchronizing package databases...
 core                        136.2 KiB   532 KiB/s 00:00 [##############################] 100%
 extra                      1587.8 KiB  2.18 MiB/s 00:01 [##############################] 100%
 community                     5.8 MiB  4.18 MiB/s 00:01 [##############################] 100%
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

My pacman.conf:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
#ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Server = http://il.us.mirror.archlinux-br.org/$repo/os/$arch
Include = /etc/pacman.d/mirrorlist

[extra]
Server = http://il.us.mirror.archlinux-br.org/$repo/os/$arch
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Server = http://il.us.mirror.archlinux-br.org/$repo/os/$arch
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

#[multilib]
#Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Edit: Solved by deleting everything in /var/lib/pacman/sync/, restarting and using pacman -Syu

Last edited by democratoide (2021-09-25 00:22:35)

#
10 лет, 8 месяцев назад

Темы:

4

Сообщения:

13

Участник с: 09 апреля 2012

Здравствуй, сообщество!

В свете недавнего обновления pacman перестал функционировать

sudo pacman -Syu
ошибка: GPGME error: No data
ошибка: GPGME error: No data
ошибка: GPGME error: No data
:: Синхронизируются базы данных пакетов...
 core не устарел
 extra не устарел
 community не устарел
 catalyst не устарел
 xorg111 не устарел
ошибка: база данных 'core' повреждена (неверная или поврежденная база данных(PGP-подпись))
ошибка: база данных 'catalyst' повреждена (неверная или поврежденная база данных(PGP-подпись))
ошибка: база данных 'xorg111' повреждена (неверная или поврежденная база данных(PGP-подпись))

выполнял

sudo  rm -rf /etc/pacman.d/gpgme
sudo  pacman-key --init
sudo  pacman-key --populate archlinux

может ли данная проблема возникнуть из-за задержек с изменениями на зеркале, или же это у меня особо кривые руки?
почему в ошибке нет ни слова ни про extra ни про community ?
Спасибо!

UPD:
как-то все наладилось после
pacman -Scc

Contents

  • 1 Software Installation
    • 1.1 «Unrecognized archive format» Error
      • 1.1.1 One recipe for fixing this
    • 1.2 «Unable to lock database» Error
    • 1.3 Errors about Keys
    • 1.4 «Configuration file…not recognized» Error
    • 1.5 «GPGME error: No data» Error
      • 1.5.1 Option 1: Basic Resolution
      • 1.5.2 Option 2: Comprehensive Resolution
    • 1.6 «keyserver refresh failed: No dirmngr» Error
  • 2 See Also

1 Software Installation

Various issues relating to the download and installation of software packages from the Parabola repositories are dealt with here.

1.1 «Unrecognized archive format» Error

It has ocurred more than once, an update is issuing these messages in a seemingly never ending stream.
Pacman could not open file: sync files

error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format

The error relates to a mismatch in the information contained in the db files at the mentioned location and the db files at the first mirror in your mirrorlist. Pacman checks a package in the database and sees if the signature file matches the one in the database. If it does not, then pacman will say the package is corrupted.

While it sometimes is possible to fix the issue simply by deleting the files and the running a pacman update it far from every time.

1.1.1 One recipe for fixing this

It is important to ensure that your key-rings are current; in order to to maintain the chain of trust between the key-rings and the packages, so that pacman can verify the authenticity of the packages.

You can find the exact package names by browsing to the following URL

https://repomirror.parabola.nu/pool/packages/ (look for the current 'archlinux-keyring')
https://repo.parabola.nu/pool/archlinux32/    (look for the current 'archlinux32-keyring')
https://repomirror.parabola.nu/pool/parabola/ (look for the current 'parabola-keyring')

Run the commands below, replacing «YYYYMMDD» and «R» with the info found at the above repos

$ sudo pacman -U https://repomirror.parabola.nu/pool/packages/archlinux-keyring-YYYYMMDD-R-any.pkg.tar.xz
$ sudo pacman -U https://mirror.archlinux32.org/pool/archlinux32-keyring-transition-YYYYMMDD-R-any.pkg.tar.xz
$ sudo pacman -U https://repomirror.parabola.nu/pool/parabola/parabola-keyring-YYYYMMDD-R-any.pkg.tar.xz

Remove your faulty databases

$ sudo rm -f /var/lib/pacman/sync/*

Refresh the databases and run a full system update

$ sudo pacman -Syu

1.2 «Unable to lock database» Error

When downloading and installing software from the repositories, a special database lock file will be created in order to ensure that the current installation process is the only one running at that time. Otherwise, attempting to install multiple files from multiple sources simultaneously may corrupt the downloaded files, cause file conflicts — or worse still — damage your system. Once the installation has been completed, the lock file will then be automatically deleted. This error may therefore occur due to two possible reasons:

  • Another installation is still taking place and has not yet finished, or
  • A previous installation attempt had not finished properly (e.g. due to being aborted early)

It is therefore wise to first check to ensure that another installation is not (or had not been) in process at the time of the error. When satisfied that this is not the case, then the database lock file can be manually deleted. To do so, open up the terminal and enter the following command:

sudo rm /var/lib/pacman/db.lck

Once done, you should now be able to successfully re-attempt your intended installation.

1.3 Errors about Keys

We all have our own unique signatures which are used to authenticate who we are and to prevent fraudulent or even malicious activities by others. This is also the case with software packages available from the software repositories. They all contain encrypted codes (signature keys) unique to their developers to ensure that they are authentic and not malicious in nature.

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 for any reason, then the installation process will be aborted. This problem will usually occur due to:

  • one or more signature keys contained in your system’s database being revoked, changed, corrupted, or out of date
  • one or more software packages not having been signed off properly when placed in a repository

Where a package has not been signed off properly before being placed in a repository, it will be the responsibility of the developer(s) to correct this. However, as this problem will be more than likely due to a problem with your system’s verification of a signature key, this can be solved in three easy steps. Working net connection is required. Once you have opened your terminal:

Please, follow Parabola_Keyring#pacman-key —populate does not work. Then, try to run sudo pacman -Syu in your regular system to see if the errors were resolved.

1.4 «Configuration file…not recognized» Error

Parabola’s package manager — pacman — uses a file called mirrorlist to tell it the internet addresses of the Parabola servers in order to download updates and software applications from them. This error will therefore occur if one or more server addresses contained in the mirrorlist file have not been listed properly, resulting in pacman being unable to connect to them. Another tell-tale sign is that this problem will also be encountered immediately after:

  • Installing Parabola and editing the mirrorlist file during installation, or
  • Editing the mirrorlist file at a later time.
    sudo pacman-mirrors --country-list
    This can also be done manually by editing /etc/pacman.d/mirrorlist. Please, read the documentation within the file.

1.5 «GPGME error: No data» Error

The most likely cause of this issue is that an error or corruption has been detected by pacman in one or more software packages being downloaded. Package signatures and checksums are used to verify the validity of downloaded software, and should they fail, the installation attempt will be aborted to protect your system until the matter is resolved.

1.5.1 Option 1: Basic Resolution

To resolve this issue, first follow the basic procedure provided below. If this does not work, then there is a more comprehensive procedure available.

  1. Resynchronise with the Parabola servers to ensure that everything is up to date by entering the command:
    sudo pacman -Syy
  2. Clear out the software packages downloaded during the aborted installation by entering the command:
    sudo pacman -Sc
  3. Re-attempt the aborted download.

1.5.2 Option 2: Comprehensive Resolution

If the basic procedure still does not resolve the matter, further steps are available:

  1. Resynchronise with the Parabola servers to ensure that everything is up to date by entering the command:
    sudo pacman -Syy
  2. Remove current keys
    sudo mv /etc/pacman.d/gnupg /tmp
  3. Initialize the keys’ database
    sudo pacman-key --init
  4. Reload the signature keys by entering the command:
    sudo pacman-key --populate archlinux parabola
  5. Refresh and update the signature keys by entering the command:
    sudo pacman-key --refresh-keys
  6. Clear out the software packages downloaded during the aborted installation

    Warning: This command (optional) clears the pacman cache, and which would make it harder to downgrade to a previous version of a package if required. Instead packages that are causing signing errors can be removed individually when upgrading (see man pacman and look for the -c, —clear entry).

    sudo pacman -Sc
  7. Re-attempt the aborted download.

Another alternative is to do this in a live system

1.6 «keyserver refresh failed: No dirmngr» Error

Try running the following command:

sudo dirmngr </dev/null

2 See Also

  • Change to a Different Download Server
  • System Time Setting
  • Use Rankmirrors to Set the Fastest Download Server
  • Set_DNS_and-or_Nameservers | Set DNS for Pacman to resolve timeout issues
  • Arch wiki for more comprehensive troubleshooting

nauseous


Tutorial and Install Howto

Tuesday, 03 June 2014

2849 Hits

Hello Guys,

I was trying to install a package via pacman today it resulted in the error message below:

error: GPGME error: No data

From what I got to know from Manjaro Wiki: The cause of this issue is that an error or corruption has been detected by pacman in one or more software packages being downloaded. Package signatures and checksums are used to verify the validity of downloaded software, and should they fail, the installation attempt will be aborted to protect your system until the matter is resolved.

Quick Fix

To quickly fix it, I just re synced Manjaro servers:

sudo pacman -Syy

and cleared out packages downloaded earlier:

sudo pacman -Scc

After I re-run my package installation command everything worked fine. I hope yours work too, if it doesn’t fine another option here

Enjoy!.


Font size:

+


Report


Print

About the author

nauseous

Nauseous is a developer, blogger and Linux enthusiast. Nauseous real name is John and is an expert in Hadoop, Spark and Linux performance. John has produced a new record @ 2 minutes 57 second running a terasort on Hadoop/Spark with 10 servers, 48 core, as well as Aerospike at 12.1 million packets which is the highest record today.   

John is also a professional in security, application deployment, performance and web applications. Currently John has the best record for NginX and Apache performance running a single machine with 4 cores.  

John manages all the server here at Linuxsecrets.com


0

0

[one@chakra ~]$ sudo pacman -Syu
ошибка: GPGME error: No data
ошибка: GPGME error: No data
ошибка: GPGME error: No data
ошибка: GPGME error: No data
:: Синхронизируются базы данных пакетов...
 core не устарел                                                       0,0   B  0,00B/s 00:00 [------------------------------------------------------]   0%
 platform не устарел                                                   0,0   B  0,00B/s 00:00 [------------------------------------------------------]   0%
 desktop не устарел                                                    0,0   B  0,00B/s 00:00 [------------------------------------------------------]   0%
 apps не устарел                                                       0,0   B  0,00B/s 00:00 [------------------------------------------------------]   0%
 kde-unstable не устарел
ошибка: база данных 'core' повреждена (неверная или поврежденная база данных(PGP-подпись))
ошибка: база данных 'platform' повреждена (неверная или поврежденная база данных(PGP-подпись))
ошибка: база данных 'desktop' повреждена (неверная или поврежденная база данных(PGP-подпись))
ошибка: база данных 'apps' повреждена (неверная или поврежденная база данных(PGP-подпись))
[one@chakra ~]$ 

ЧЯДНТ? pacman-key —init делал, не помогает. это вылезло после попытки подключить реп с нестабильными кедами.

Понравилась статья? Поделить с друзьями:
  • Error gpg failed to sign the data fatal failed to write commit object
  • Error gostypeau cannot be embedded because of licensing restrictions
  • Error google play not install
  • Error god of war ascension
  • Error gnu stubs 32 h no such file or directory