Posts Tagged ‘GNU/Linux’

How-To fix the GPG error: “The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY”

Wednesday, February 6th, 2013

These are the few command-line instruction to fix the GPG Error (NO_PUBKEY) that may appear when trying to run the ‘apt-get update’ command on a APT based system:

“GPG error: http://some.site.com stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY SOMEGPGKEY

This issue may reveal itself when you want to source packages from a repository that is unknown by your copy of the GPG  database, therefore APT will consider the repository as an untrusted source.

If you are sure that the repository is safe, you can circumvent the error manually adding the site’s public key to your GPG database using the following commands:

don’t use sudo if you act as root
$ gpg --keyserver subkeys.pgp.net --recv SOMEGPGKEY
$ gpg --export --armor SOMEGPGKEY | sudo apt-key add -

Comments and feedbacks and ‘like’ are welcome as always!

How-To Send A Command In Background And Keep It Running using ‘nohup’

Tuesday, March 20th, 2012

The shell command ‘nohup‘ in combination with ‘&‘ will allow to send the a command-line instruction in background enabling the process to keep running after the user who issues the command has logged out.

A common use of ‘nohup’ is when you need to issue a remote command via ssh connection and then you need to close the connection but be sure that the issued command will keep running in background, i.e.:

~$ sudo nohup shutdown -r -h 1203192100

I use this ‘trick’ when I want to restart my Mac and GNU/Linux Servers during evening/night hours but I want to submit the command during my office time.
In such way I save myself the time to remotely connect from home.

The ‘nohup’ command is even used to run processes in background as daemons.

nohup is a POSIX command to ignore the HUP (hangup) signal
(cit. from Wikipedia)