简体   繁体   中英

gpg: no valid OpenPGP data found. while installing SQL Server in Ubuntu 18.04

I'm installing SQL Server on Linux Ubuntu 18.04, according to the tutorial https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver15 , however when executing the first command

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

I get the following error

gpg: no valid OpenPGP data found.

I've done several researches about the error, installed ca-certificates, installed all the gpg packages but I still can't solve the problem, can someone direct me to a solution?

The command works fine for me. In all likelihood there is a firewall or proxy server silently blocking and/or rewriting the web page.

Do this:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc 

In all likelihood it will print out something that tells you what is intercepting the traffic and preventing you from getting the real key. Once you figure out what's blocking the traffic, you'll have to figure out how to get it to stop.

My problem was the internet connection configuration, in my /etc/netplan/00-installer-config.yaml file, the network mask was wrong

I have the same problem. I believe 99.99% of it's a connection issue. You might be connecting through a firewall or VPN. I have the same issue when I only connect through the company network. I tried the same command on a machine at my house, and it's working just fine.

You can just add "--no-check-certificate" to the command:

wget --no-check-certificate -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

If you want to see what is going on, you can use verbose command instead of quiet before adding "--no-check-certificate" option. eg

wget -vO - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

This will tell you to use "--no-check-certificate" if you are behind proxy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM