I cant reinstall phantomjs 1.9.8 to 2.1.1 version on my ubuntu 16.04 Please help. 1.9.8 give me an errors when I write a spin functions, in documentation see that this ploblem I can solve with reinstalation.
相关问题
- Why doesn't php sleep work in the windows-subs
- Installing Pydev for Eclipse throws error
- Error building gcc 4.8.3 from source: libstdc++.so
- what's the role of libopenssl-ruby?
- Docker why isn't $USER environment variable se
相关文章
- 为什么nfs在不同版本的Linux下安装的文件都不一样
- Incompatible JavaHl library loaded
- Python - Node.js (V8) runtime is not available on
- Ubuntu graphviz 'sfdp' not working
- Ubuntu graphviz 'sfdp' not working
- Gearman , php extension problem : Class 'Gearm
- Decrease the tabs bar height in gnome terminal
- How do I capture JavaScript errors generated in a
For those who have problems to install like me
it is more easy than you think...
sudo apt-get remove phantomjs
or remove npm folder of/node_modules/phantomjs
it will be in/
, maybe you will need to removeln
the link of phantomjs in/usr/bin
or/usr/local/bin/
the name of it isphantomjs
Example
npm install phantomjs
from/
directory, npm install it in folder/node_module/phantomjs
Example
Example
/usr/bin
:Example
ln -sf /node_modules/phantomjs/bin/phantomjs /usr/bin/phantomjs
phantomjs -v
in my case2.1.1
I just installed phantomjs 2.1.1 in ubuntu 16.04 with the following steps, which I found after a bit of googling :
So, jmunsch's answer works for me, but just to provide a clear and minimal recipe:
The last line requires sudo because of /usr/bin, but you can put the symlink anywhere...
Here is how I would do it if I were developing. The packages are versioned to nodejs and not ubuntu:
Use
nvm
: https://github.com/creationix/nvmPerhaps we are developing on
0.10, 0.12, 4.X, iojs4.x, 6.X, etc
well now we have access to choose whichever version of phantomjs:system-wide for deployment scenarios, etc.
Here is how using the tarball
Tested on ubuntu 14.04, perhaps moving the folder to another place other than
./
update for 16.04:
wget may or may not work see: https://github.com/Medium/phantomjs/issues/161
Error
Try:
phantomjs 2.1.1 is now currently bundled with 16.04 (https://launchpad.net/ubuntu/xenial/+source/phantomjs), so you should be able to install/upgrade it as a system package.
Update: This answer exists for informative purposes, but it is not recommended to use the system package version now due to issues such as: https://bugs.launchpad.net/ubuntu/+source/phantomjs/+bug/1605628 This is related to an issue with file upload that was fixed upstream, but the nature of the fix prevented it from working as a system package.
The best current option is use the prebuilt binary from: https://bitbucket.org/ariya/phantomjs/download