I'm trying to install MikTex on Ubuntu 18.04 following the instructions in the website.
The first command,
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889
gives the error
gpg: keyserver receive failed: Invalid argument
What could be the problem?
I don't know the root cause, but following the instructions here I was able to get the keys.
These download and install the gpg key:
wget -q \
"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xD6BC243565B2087BC3F897C9277A7293F59E4889" \
-O- | gpg --dearmor \
> miktex-D6BC243565B2087BC3F897C9277A7293F59E4889.gpg
sudo mv miktex-D6BC243565B2087BC3F897C9277A7293F59E4889.gpg \
/etc/apt/trusted.gpg.d/
You should then be able to continue with the next steps (sudo apt update and so on).
Related
I want to install go-swagger on LInux Ubuntu 22.04 but i have blocker. This is my code to install go-swagger.
sudo apt update
sudo apt install -y apt-transport-https gnupg curl
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key' | sudo apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/config.deb.txt?distro=debian&codename=any-version' | sudo tee /etc/apt/sources.list.d/go-swagger-go-swagger.list
sudo apt update
sudo apt install swagger
but the result on my laptop
Unable to locate package swagger,
please help me to the solving my blocker
This is similar to the bug on Caddy due to changes in CloudSmith. Run
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key' | sudo gpg --dearmor -o /usr/share/keyrings/go-swagger-go-swagger-archive-keyring.gpg
to import the key.
I started using GNU Privacy Guard. An error occurs when trying to import a key from any server:
gpg --keyserver keys.gnupg.net --recv-key 908F435E
Output:
gpg: keyserver receive failed: No name
I stumbled upon this today and found the fix at Maven Central Repository Documentation. The SKS Keyserver Network is being deprecated and probably gone by now. Just use another GPG key server like:
keyserver.ubuntu.com
keys.openpgp.org
pgp.mit.edu
So for example
gpg --keyserver keyserver.ubuntu.com --recv-key 908F435E
Try these command one by one. It works for me.
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import
As an alternative to the options above, from the RVM security documentation,
If you encounter problem with the key server above, try a different one. Some alternatives are presented below:
hkp://ipv4.pool.sks-keyservers.net
hkp://pgp.mit.edu
hkp://keyserver.pgp.com
The second one worked for me, hkp://pgp.mit.edu
Replace $key with the corresponding $key you want to add.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $key
This works on Ubuntu 20.04 (Focal Fossa).
Please use these commands one by one:
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
Or you can refer to the rvm.io.
keys.gnupg.net is just an alias to pool.sks-keyservers.net. You can point directly to this second address and it will work.
So I installed brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and then I installed gnupg2 and gnupg like so:
brew install gnupg gnupg2
I tried to install both again seperately like so:
brew install gpg2
brew install gnupg
and it said both are already installed. (wanted to confirm it).
Now, when I try to install RVM like so:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
my MAC says
-bash: gpg2: command not found
Any idea why?
On Mac, installing with brew already gives you gpg2, but it's named as gpg, so you need to create an alias or a symlink. A symlink worked for me.
brew install gnupg
Get where is gpg located
which gpg
In my case it was /usr/local/bin/gpg
Then create symlink:
ln -s /usr/local/bin/gpg /usr/local/bin/gpg2
after
brew install gpg2
execute
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
brew install gpg2
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
This works for me
I'm trying to install Ruby on Ubuntu 16.04. However when I enter to following command to terminal:
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
I get the following:
Downloading https://github.com/rvm/rvm/archive/1.29.1.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc
gpg: Signature made 19 فبر, 2017 EET 10:02:47 م using RSA key ID ********
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).
GPG signature verification failed for '/home/tamer/.rvm/archives/rvm-1.29.1.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys ****************************************
or if it fails:
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
the key can be compared with:
https://rvm.io/mpapis.asc
https://keybase.io/mpapis
NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
When I tried any rvm command I got 'command not found'.
I tried requesting https://rvm.io/mpapis.asc through the browser. Then running the following:
$ gpg --import mpapis.asc
but I got the following:
gpg: fatal: can't open `/home/tamer/.gnupg/trustdb.gpg': Permission denied
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/65536
I'm not used to do something that I don't understand, so I stopped their and didn't try sudo.
So how can I install Ruby?
Update
I also tried installing gpg2 using:
$ sudo apt-get install gnupg2 -y
and then I tried
$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys <key>
and also
$ curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
But still, the same result when I try install rvm with the first command.
n.b. I noticed that I have gpg v1.4.20 and gpg2 v2.1.11
After trying many ways. I did succeed to install rails as follows:
$ \curl -sSL https://get.rvm.io | bash
$ source /home/<user>/.rvm/scripts/rvm
$ rvm -v
$ rvm install ruby
$ ruby -v
$ sudo apt-get install rubygems
$ gem update
$ sudo apt-get install ruby-dev zlib1g-dev liblzma-dev build-essential patch
$ rvm gemset list
$ gem install rails
$ rails -v
Where "user" is my username
I am just posting an update solution for it as I faced the same issue in Ubuntu 18.04 while trying to fetch keys for RVM.
The following method is provided by RVM.
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
If it doesn't work out and you try to install rvm directly, the process will fail and provides three suggestions to receive keys. One of which have a step to receive the keys with gpg2.
Install gpg2 in your system before that.
sudo apt install gnupg2
The command is
gpg2 --recv-keys 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
But this command too will not work.
So here's an alternative. Just replace the gpg from the older command to gpg2 which worked for me.
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
In addition to the previous answers, if you are behind a firewall, the following command might not work for you.
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
In that case, you can use the following command to get the keys -
sudo apt-key adv --keyserver hkp://keys.gnupg.net:80 --recv-keys <<key>> <<key>>
I had the same issue but on Debian and I took an alternate approach. In the error message, it says this: "Try to install GPG v2 and then fetch the public key:" with a gpg2 command after it. I went and installed gpg2 first and ran the command it told me to and it worked for me.
sudo apt-get install gnupg2
sudo apt-get install dirmngr
gpg2 --recv-keys <key>
# <Run curl command to install rvm>
I had issues in receiving the server keys and switched the key server to an alternative list mentioned in https://rvm.io/rvm/security
hkp://ipv4.pool.sks-keyservers.net
hkp://pgp.mit.edu
hkp://keyserver.pgp.com
This appear a port issue, Try this:
gpg --keyserver hkp://keys.gnupg.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
Is work for me.
sudo apt-key adv --keyserver hkp://keys.gnupg.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
I have a new mac pro (OS X 10.9.5) that I get to set up from scratch. I want to install RVM and the first thing it says to do is:
Install mpapis public key (might need gpg2 and or sudo)
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
When I tried I got:
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
zsh: command not found: gpg
I've tried to find a good guide on how to overcome this that also looks trustworthy but I've had no luck.
Can someone explain what gpg is, why I dont already have it, and how do I get it the right way.
GnuPG (with binary name gpg) is an application used for public key encryption using the OpenPGP protocol, but also verification of signatures (cryptographic signatures, that also can validate the publisher if used correctly). To some extend, you could say it's for OpenPGP what OpenSSL is for X.509 and TLS.
Unlike most Linux distributions (which make heavy use of GnuPG for ensuring untampered software within their package repositories), Mac OS X does not bring GnuPG with the operating system, so you have to install it on your own.
Possible sources are:
Package manager Homebrew: brew install gnupg gnupg2
Package manager MacPorts: sudo port install gnupg gnupg2
Install from GPGTools, which also brings GUI applications and integration in Apple Mail
As the instruction said "might need gpg2"
In mac, you can try install it with homebrew
$ brew install gpg2
On Mac OSX 10.15,
Even after installing gpg, i was getting gpg2 command not found
$ brew install gnupg gnupg2
Warning: gnupg 2.2.23 is already installed and up-to-date
To reinstall 2.2.23, run `brew reinstall gnupg`
$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-bash: gpg2: command not found
Instead, this worked for me
$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Here are the steps to install RVM.
Step 1: Install gpg or gpg2 (both work)
brew install gpg
Step 2: Install GPG keys used to verify installation package:
gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
If you encounter problem with the key server above, try a different one.
hkp://ipv4.pool.sks-keyservers.net
hkp://pgp.mit.edu
hkp://keyserver.pgp.com
Step 3: Install RVM
\curl -sSL https://get.rvm.io | bash -s stable
Check out the Security page if you still run into problems.
This worked for me
$brew install gnupg
After installing gpg using:
brew install gnupg2
This solution helped me get the keys to install rvm:
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
On my clean macOS 10.15.7, I needed to brew link gnupg && brew unlink gnupg first and then used Ashish's answer to use gpg instead of gpg2. I also had to chown a few directories. before the un/link.
I was facing the same issue when I was trying to install RVM on a UNIX Apple M1.
I can solved my issue with this command:
gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Instead of use gpg2:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
After run the command I had this output:
gpg: key 195BD3E759199BDB: 1 duplicate signature removed
gpg: /Users/User/.gnupg/trustdb.gpg: trustdb created
gpg: key 105BD0E739499BDB: public key "Piotr Kuczynski <piotr.kuczynski#gmail.com>" imported
gpg: key 3804BB82D39DC0E3: public key "Michal Papis (RVM signing) <mpapis#gmail.com>" imported
gpg: Total number processed: 2
gpg: imported: 2
Note:
Don't forget to restart your command console.
You can also use:
$ sudo gem install rvm
It should give you the following output:
Fetching: rvm-1.11.3.9.gem (100%)
Successfully installed rvm-1.11.3.9
Parsing documentation for rvm-1.11.3.9
Installing ri documentation for rvm-1.11.3.9
1 gem installed