Ubuntu: Solves the GPG error caused by unofficial sources

Source: Internet
Author: User
Ubuntu: Solves the GPG error caused by unofficial sources
[Date: 2010-03-30] Source: UbuntuCommunityAuthor: Ubuntu [Font: large, medium, and small]

When we add an unofficial Ubuntu source to/etc/APT/sources. List to install and update some software, The sudo apt-Get update will prompt an error.
The following uses the ibus unofficial source I use as an example. The error message is as follows:
W: GPG error: http://ppa.launchpad.net jaunty release: The following signatures couldn't be verified because the public key is not available: no_pubkey 21c022aa985e0e11
W: You may want to run apt-Get update to correct these problems
That is, this unofficial source is untrusted. The solution is to import the public key of the source.

We usually use sudo to manage the system, so pay attention to it in some places. Otherwise, errors may easily occur.

Import the source public key from the Public Key Server to the current user's public key library.
$ GPG-keyserver wwwkeys.eu.pgp.net-Recv-keys 21c022aa985e0e11
There is no need to run sudo here. Just import the public key to the current user. If it is used, an error may be prompted.
GPG: Warning: unsafe ownership on configuration file '/home/username/. GnuPG/GPG. conf'
GPG: external program cballs are disabled due to unsafe options File Permissions
GPG: keyserver communications error: general error
GPG: keyserver receive failed: general error
This will cause the owner and running of GPG. conf.ProgramUser inconsistency, of course, if you run under the root user, this problem does not exist, because the public key is imported to the root user's keystore.

After the public key is imported successfully, the following prompts are displayed:
GPG: requesting key 985e0e11 from HKP server wwwkeys.eu.pgp.net
GPG: Key 985e0e11: public key "Launchpad PPA for ibus-dev" imported
GPG: Total number processed: 1
GPG: imported: 1 (RSA: 1)

Next, let apt-Get use this public key.
$ GPG-Armor-export 985e0e11 | sudo apt-key add-

Note that APT-key add can be run only by privileged users, that is, sudo. Otherwise, the following error message is displayed:
GPG: No writable keyring found: EOF
GPG: Error reading '-': general error
GPG: import from '-' failed: general error

After the import is successful, sudo apt-Get update will not receive any error message.

Http://www.coder4.com/archives/1445

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.