1

I try to install Torcs, while make works, make install stops with an error:

/usr/bin/install: cannot create regular file '/usr/local/bin//torcs': Permission denied

The path is quite obviously wrong I guess, there shouldn't be //, but only a single one. How can I fix this? I can't figure out where the wrong path is generated.

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
Natjo
  • 2,005
  • 29
  • 75
  • It's unlikely the extra slash is the culprit, are you sure you simply don't have the right permissions? Have you tried `sudo make install`? – user657267 Nov 14 '17 at 10:16
  • The double slash doesn't influence *anything*. If you want to directly install in your system, run `make install` as root, e.g. using `sudo`. If you want to create a binary package, use something like `make DESTDIR=/home/xyc/torcs-pkg install`. –  Nov 14 '17 at 10:17
  • @FelixPalmen, I noticed the sudo was the problem, but either way I didn't want to install it as root. Your trick with `DESTDIR` solved it. Thank you! – Natjo Nov 14 '17 at 10:42
  • @Jonas it won't run from the location where you install it with `DESTDIR`. If you want to install it runnably somewhere else than default, use `prefix` when building it (**before** `make install`). –  Nov 14 '17 at 10:44

0 Answers0