Reputation: 331
I tried to install SpiderMonkey 45 in Ubuntu 16.04, but I failed. I refered to SpiderMonkey Build Documentation and finished the make process.
cd js/src
autoconf-2.13
mkdir build_DBG.OBJ
cd build_DBG.OBJ
../configure --enable-debug --disable-optimize
make
After the installation, when I change the directory to ../build_DEBUG.OPT/js/src/shell
and type js
, the terminal gave me an error:
The program 'js' can be found in the following packages:
* nodejs
* rhino
Try: sudo apt install <selected package>
How to solve the problem? Thank you very much.
Upvotes: 1
Views: 209
Reputation: 13547
Calling js
directly looks in your PATH
environment variable for an executable called js
. Since the directory that you built Spidermonkey in isn't in your path, the executable isn't found, causing an error.
./js
expands to <your current directory>/js
, which is specific enough for your terminal to find the executable and run it.
See this question for a more general explanation as to why ./executable
works but executable
doesn't.
Upvotes: 1