Score:0

installment for the openFoam, fail to add public key

ug flag

When I install OpenFoam, I used the line provide online,

sudo sh -c " wget -o - http://dl.openfoam.org/gpg.key | apt-key add-" 

It gave an error and said

gpg: no valid OpenPGP data found

How can I resolve this and install OpenFoam?

Score:1
cn flag

You can do it with curl, which is easier in my opionin, or you can do it with wget, as I explain at the end.

With curl

Replace your command with this, and it should work.

curl -sS http://dl.openfoam.org/gpg.key | sudo apt-key add -

That command will get the key, and pipe it to sudo apt-key add -. curl, unlike wget, outputs to stdout by default, which is easier IMO.

With wget

wget as you wrote it won't work. The command was mostly correct, but you made two errors when copying it, and that messed you up. This is the proper way to write it:

sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"

That is pretty much the same as what you wrote, but with two major differences. The -O after wget is capital, which is what you want to change where wget outputs to. And second, I addded a space after apt-key add, but before the hyphen, which fixes a different error.

Yifeng Shen avatar
ug flag
thanks guy ,much better
cocomac avatar
cn flag
@YifengShen Glad to help! If I fixed your problem, can you please [accept my answer](https://meta.stackexchange.com/a/5235/1081494)? You can do this by clicking the grey checkmark next to the vote buttons. Thanks!
Yifeng Shen avatar
ug flag
sorry,mate this is the first time i use this website,i had do that ,lovely thank guy
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.