0

I am have trouble installing the nonfreefonts. When I execute getnonfreefonts -sys -a I get Unknown option: y. If I run for example getnonfreefonts -user --version I get Unknown option: e.

I am almost certain I used the same steps to install the fonts before, but this time I am doing it in a virtual machine - which shouldn't make a difference, but you never know...

My full setup:

  • VirtualBox 5.1.26
  • Windows 8.1 64 bit as host
  • Linux Mint 17.2 64 bit as guest
  • GNU bash, Version 4.3.48(1)-release (x86_64-pc-linux-gnu)
  • TeX Live 2017
  • getnonfreefonts, revision 2017-06-02

Any ideas what might cause the error? Am I using the tool wrong or does the bash works incorrectly?

  • Maybe try withgetnonfreefonts --user --version – samcarter_is_at_topanswers.xyz Aug 24 '17 at 14:50
  • 2
    and getnonfreefonts --sys -a or getnonfreefonts --sys --all – samcarter_is_at_topanswers.xyz Aug 24 '17 at 14:53
  • 2
    In general, a single hyphen is used only for a short, one-letter option and a double hyphen for long, multi-letter option names. If you write -sys, this will be interpreted as if you'd written -s -y -s. But -y is not recognised. Similarly -user is -u -s -e -r but -e is not recognised (and -s probably trumps -u here). – cfr Aug 24 '17 at 15:48
  • @samcarter Good spot. You should answer. Maybe include the explanation? – cfr Aug 24 '17 at 15:48
  • @cfr Your comment explains the problem very nicely - it would be a waste of time if I tried to write something - can you please convert it in an answer? – samcarter_is_at_topanswers.xyz Aug 24 '17 at 15:52
3

This is samcarter's spot, but the spotter insists it is better to convert my explanation to an answer.

You need, for example,

getnonfreefonts --sys -a 

or

getnonfreefonts --sys --all

as samcarter said. The reason for this is that getnonfreefonts follows the standard shell convention that a single hyphen indicates one or more short, one-letter option(s), while a double hyphen is used for a single, multi-letter option.

If you write -sys, this will be interpreted as if you'd written -s -y -s. But -y is not a recognised option, as the error tells you. Similarly -user means -u -s -e -r but -e is not recognised, as the other error tells you. Moreover, in this latter case, -s probably trumps -u.

The errors are not entirely clear because the usage information produced by --help is incomplete, in that it does not list all short-form options recognised by the command. Looking in the script, -s is an undocumented alternative for --sys and -u for --user. This is why the errors do not complain about -s and -u being unrecognised (rather than -y and -e), as we might have naïvely expected from the usage listing of options.

| improve this answer | |

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.