我如何设置 &在 Ubuntu 上运行 PhantomJS? [英] How can I setup & run PhantomJS on Ubuntu?
问题描述
我设置了 PhantomJS 并将其录制为视频:https://www.dailymotion.com/video/xnizmh_1_网络摄像头
I set up PhantomJS and recorded it to video: https://www.dailymotion.com/video/xnizmh_1_webcam
构建说明:http://phantomjs.org/build.html
我的设置有什么问题吗?
Is there anything wrong in my setup?
设置后,我阅读了快速入门教程并尝试写下这段代码
After I set it up I read the quick start tutorial and tried to write this code
phantomjs hello.js
它给了我找不到命令"错误.我该如何解决这个问题?
It gives me "command not found" error. How can I solve this problem?
推荐答案
Guidoil 的回答让我走上了正轨.我不得不向/usr/bin/添加一个额外的符号链接,并且我为所有 3 个都做了直接符号链接 - 见下文.
Guidouil's answer put me on the right track. I had to add one additional symlink to /usr/bin/, and I did direct symlinks for all 3 - see below.
我正在 Ubuntu 服务器 Natty Narwhal 上安装.
I'm installing on Ubuntu server Natty Narwhal.
这正是我所做的.
cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
最后当我这样做
phantomjs -v
我得到 1.9.7
如果有人发现我所做的有任何问题,请告诉我.
If anyone sees any problems with what I've done, please let me know.
这篇关于我如何设置 &在 Ubuntu 上运行 PhantomJS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!