I'd like to install php 56 on my Debian Wheeyz System. So I added the dotdeb repo to apt. While fetching the key, an error occurred:

   # wget http://www.dotdeb.org/dotdeb.gpg -O- |apt-key add –
   # gpg: can't open `–': No such file or directory

What do I have to change to add the key to apt?


Your only problem is that the dash after apt-key add is not the ASCII 0x2D hyphen character, but the Unicode U+2013 en dash. The former instructs apt-key to read the key from the standard input (where the preceding wget provides it through the pipe), while the latter is not treated specially, thus interpreted as a file name to read the key from. Unsurprisingly, such a file does not seem to exist in your current directory.

  • True: If you copy the command from the blogs, WordPress converts - to Unicode as well. Nov 7 '19 at 14:59
  • you save my life, i just got the same problem and got the tutorial from blog like @yami
    – kreamik
    Jun 11 at 11:28

Use this:

wget -qO - http://www.dotdeb.org/dotdeb.gpg | apt-key add -

You need a space after the -O and the character after add seems to be wrong. -q turns off the output of wget.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.