Z
Z
ZaurK2018-03-05 10:38:20
linux
ZaurK, 2018-03-05 10:38:20

How to assign symlinks correctly?

Hello! I'm trying to run casperjs from a php file, have done it before but always get confused with symlinks. Please explain how to understand such an entry in bash:

$ ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs

If I understand correctly, this is the assignment of a link to the executable file `pwd`/bin/casperjs and we are in the casperjs folder. Here's what the entry "/usr/local/bin/casperjs" means - what does that mean? When I run this command I get the error ln: failed to create symbolic link '/usr/local/bin/casperjs': No such file or directory

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
ZaurK, 2018-03-05
@ZaurK

Solved the problem without symlinks. In general, the difficulty was that casperjs did not see phantomjs and the error "did you install phantomjs?" Everything worked when I specified the path to the executable in the php file putenv("PHANTOMJS_EXECUTABLE=C:/phantomjs/bin/phantomjs");

C
CityCat4, 2018-03-05
@CityCat4

When the command is executed, the shell will execute the pwd command and substitute the result of its execution in the place where pwd is written. Let's say I'm currently in the /tmp/zhopa directory. Then the command will be executed

ln -sf /tmp/zhopa/bin/casperjs /usr/local/bin/casperjs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question