PhantomJS在Linux系统上的安装与调用过程(Centos7)

Linux安装Phantomjs生成Echarts图片 Linux安装Phantomjs生成Echarts 阅读详情

1、下载安装包。

(1)使用 cat /etc/redhat-release 查看Linux系统发行版本。

(2)使用 uname -a 查看操作系统信息。

(3)去phantomjs官网下载对应版本的安装包。

点击下载phantomjs安装包

(4)使用FTP工具上传安装包到服务器,可以直接上传到/root目录下。

-------------------------------------------------------------------------------------------------

这里插入一个额外的步骤。

如果你的主机曾经安装或者尝试安装过phantomjs,这一步是不可或缺的。

你可以使用type phantomjs命令查看是否存在着phantomjs文件,如果存在会显示文件路径。

删除软链 rm -rf  ./your_phantomjs_ln_path/ (这里注意一下删除软链时使用/path和/path/的区别)

删除环境变量,使用vim /etc/profile 打开配置文件,删除export PATH="/usr/local/phantomjs/bin:$PATH"

曾经的安装记录一定清除干净,不然会有不愿意看到的报错,比如

-bash: /usr/local/phantomjs/bin/phantomjs: No such file or directory

tar (child): phantomjs-2.1.1-linux-x86_64.tar.bz2: Cannot open: No such file or directory

tar: /usr/local/phantomjs: Not found in archive

tar: Exiting with failure status due to previous errors

-------------------------------------------------------------------------------------------------

2、解压安装包。

cd ~ #切换到根目录

tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2 #解压到当前目录(根目录)

mv phantomjs-2.1.1-linux-x86_64 /opt/phantomjs #将安装成功的phantomjs目录移动到/opt/phantomjs目录下

cd /opt/phantomjs/phantomjs-2.1.1-linux-x86_64/bin #使用ll命令查看是否存在phantomjs文件

或者,使用下面方法,直接指定解压路径:

mkdir -p /opt/phantomjs

tar -xjvf ~/phantomjs-2.1.1-linux-x86_64.tar.bz2 --strip-components 1 /opt/phantomjs/

3、建立软链或者修改环境变量。

这一步操作是为了方便地直接使用phantomjs命令,如果没有这一步的话,需要使用绝对路径进行调用:

/opt/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

建立软链和修改环境变量,使用一个就可以了。

建立软链:

ln -s /opt/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

修改环境变量:

vim /etc/profile

source /etc/profile #不必重启机器而使环境变量立即生效


测试是否配置成功:

phantomjs  或者  phantomjs --version命令都可以进行测试,没有报错代表安装成功。


Linux/CentOS环境下如何安装和配置PhantomJS工作环境 1. 安装步骤 1.1 在服务器上新建想要下载和安装的目录: 如mkdir  PhantomJS 1.2 下载PhantomJS安装包 wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 执行结果如下图: 1.3 解压工具包 tar -xjvf ph 阅读详情

相关推荐

Linux下Python3环境安装selenium跟phantomjs

场景 因为项目中在爬今日头条的时候,基于破解今日头条的验签跟cp等参数难度大,不得不转向selenium库 Linux下安装Selenium 这里主要是记录下在Linux下Python3环境中的selenium与phantomjs的安装,上一篇已经说道在Linux下进行Python3与scrapy框架的安装 (一)依赖包安装 sudo yum install build-e...

徐代龙的技术专栏 2982

Linux环境phantomjs安装,使用,常见问题

这个问题是因为Ubuntu 22.04 使用新的 OpenSSL 版本 3.0.2 而不是旧的 OpenSSL 版本 1.1.1。这些 OpenSSL 版本不完全向后兼容,所以这就是为什么您在 PhantomJS 尝试自动配置 SSL/TLS 设置时看到此错误的原因。的文章,不过是基于windows环境的使用与运行的,那Linux环境应该怎么使用。

qq1328585964的博客 8125

微动探测原理及仪器介绍

微动探测原理及仪器介绍 1、微动探测原理 1.1 基本理论 微动是由体波和面波组成,其中微动能量的百分之七十以上都来自于面波,并且它与体波的主要区别是在不均匀的介质中传播时面波会发生频散,而体波不存在频散现象,因此面波是微动探测的主要对象。 对于介质的弹性参数(如横波速度、层薄厚、压缩波速度、密度等),面波传播速度相对比较敏感,特别是对横波的敏感性很高,因此可以利用面波来反演横波速度。 在时间和空间上,微动信号具有以下特性:高度变化、无规律性、无重复性等,有研究发现全世界各处记录的微动信号都有相似

zw461450141的博客 1万+

linux安装Phantomjs详细教程

首先下载安装包,其次解压安装包,建立软连接,最后验证是否安装成功

一把村雨的博客 1091

eQTL:连接突变与基因表达的桥梁

欢迎关注”生信修炼手册”!在高等生物中,很多的重要性状都为数量形状,比如农作物的产量,人类复杂疾病(高血液,糖尿病)等等。对于这些数量性状而言,往往受到多个基因的调控作用。为了更好的开展...

庐州月光的博客 7067

什么是论文的创新点?公式化描述算是创新点吗?

写科研论文时,挑战之一就是如何让你的工作“脱颖而出”,也就是要有创新性。不管实验多么精确、推导多么复杂,若没有真正的创新,论文很可能会被拒。关于如何创新问题上,我最近在看刘雪峰老师的《科技论文写作指南》,看到了很多关于写作的新论述,在这里和大家进行分享。

加百力 的技术博客 1926

Linux安装Phantomjs

PhantomJS是一个可编程的无头浏览器. 无头浏览器:一个完整的浏览器内核,包括js解析引擎,渲染引擎,请求处理等,但是不包括显示和用户交互页面的浏览器。 1,页面自动化测试:希望自动的登陆网站并做一些操作然后检查结果是否正常。 2,网页监控:希望定期打开页面,检查网站是否能正常加载,加载结果是否符合预期。加载速度如何等。 3,网络爬虫:获取页面中使用js来下载和渲染信息,或者是获取链接处使用js来跳转后的真实地址。 Linux下安装phantomjs 1,下载 wget https://bitbuck

qq_45273160的博客 2315

用Multisim仿真一个9V供电的双工对讲机:从电桥原理到LM1875功放调试全记录

本文详细介绍了使用Multisim仿真9V供电的双工对讲机全过程,涵盖电桥原理、NE5532前置放大设计、LM1875功放调试及双工通信实现。通过实战案例解析,帮助读者掌握模拟电路设计与调试技巧,提升电子工程实践能力。

weixin_28678831的博客 115

Linux 中安装 phantomjs

centos8 安装 phantomjs 1、查看linux的版本命令:uname -a

huo_wa的博客 1133

电路板保险丝如何选型

在电路板保险丝选型过程中,需要考虑多个因素以确保其适合特定的电路需求。最后,经过以上程序选定的样品需要在实际的电路中进行测试,以验证所选择的保险丝是否合适。

weixin_57010826的博客 1310

RandLA-Net Tensorrt 推理 c++

RandLA-Net 实现 Tensorrt 部署.

J。 1109

linux/centos 下安装phantomjs

1.去官网下载phantomjs 下载地址:http://phantomjs.org/download.html 2.下载完成后,上传到服务器,进行解压 tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2 ps:执行时出现以下错误,说明未安装bzip2, tar (child): cannot run bzip2: No such fi...

xuhaogang3的博客 592

定位教程7---旋转中心标定之方法二

手算相机相对机器人关系

Quintin 6230

centos7环境下安装phantomjs

# 安装依赖软件 yum -y install wget fontconfig # 下载PhantomJS wget -P /tmp/ https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2 # 解压 tar xjf /tmp/phantomjs-2.1.1-linux-i686.t...

emtit2008的专栏 1968

34、量子概率幅世界与相关操作解析

本文详细解析了量子概率幅的概念及其在量子力学中的核心作用,介绍了量子态的表示方法与叠加原理,讨论了幺正操作在量子演化中的重要性,并阐述了量子测量的基本原理与影响。此外,文章还分析了量子系统在量子计算中的应用,包括干涉在量子算法中的作用、量子门的组合使用以及量子测量的关键地位,总结了量子系统的独特特性与面临的挑战,展望了量子计算的未来发展趋势。

pytorch8learner的博客 175

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

centos下安装运行phantomjs

centos安装phantomjs 一、下载地址 http://phantomjs.org/download.html找到linux版本下载地址,下载或者运行下面命令下载,本教程默认下载到/usr/local/路径下 [root@localhost local]# wget https://bitbucket.org/ariya/phantomjs/downloads/ph...

dipihuo0431的博客 163

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

CentOS Linux上的phantomjs安装教程

转自:http://www.oicqzone.com/pc/2014092319826.html sudo apt-get update  sudo apt-get install build-essential chrpath git-core libssl-dev libfontconfig1-dev libxft-dev  git clone git://github.co

kezhen的专栏 7039

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

CentOS 7 安装字体解决phantomjs中文错误问题

CentOS 7 安装字体解决phantomjs中文错误问题问题问题暴露测试JS解决第一步安装命令第二步找到汉字文件第三步安装看效果 安装phantomjs连接. 问题 在linux中安装phantomjs后直接使用生成图片效果: 这个是2021年08月30号的我的主页,中文都显示不出来 然后我安装了字体之后: 问题暴露 测试JS 安装成功后使用命令测试中文问题 var webpage = require('webpage').create(); //浏览百度网页,生成baidu.png图片

不知所终的博客 992

Centos7 安装PhantomJS

1.下载地址:http://phantomjs.org/download.html 2.文件名:phantomjs-2.1.1-linux-x86_64.tar.bz2 # 下载好后进行解压(由于是bz2格式,要先进行bzip2解压成tar格式,再使用tar解压) bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2 # 再使用tar进行

微步的博客 4103

CentOs 安装phantomjs

1. 下注phantomjs . 要选对应的版本 Linux  2. 设置环境变量  1)vim /etc/profile  2)在文件的最后一行,添加安装路径path语句:(注意路径是phantomjs的安装路径)  export PATH=${PATH}:/usr/local/src/phantomjs/bin/  3)保存修改后的文件  :wq  4)使用命令使环境变量生效  sour...

qq_40662918的博客 281

centos7安装 nodejs、phantomjs

因为安装ES head插件需要于是乎安装,过程很简单        第一步 照常wget nodejs(官网复制地址)        第二步  tar xvJf  node-v8.9.4-linux-x64.tar.xz用来解压tar.xz文件        第三步 安装GCC    sudo yum install gcc gcc-c++  并没有出现网上的什么异常,该更新的更新该安装的安...

zaincs的博客 401

java phantomjd linux_Linux安装PhantomJS(CentOS)

本文演示在CentOS 7 64位安装PhantomJS。下载PhantomJS$wgethttps://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2解压安装包$bzip2-dphantomjs-2.1.1-linux-x86_64.tar.bz2$tarxvfphantomjs-...

weixin_39588223的博客 123

CentOS平台安装phantomjs

CentOS平台安装phantomjs的步骤依次如下: sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel git clone git://github.com/ariya/phantomjs.git cd phantomjs git checkout 1.9 ./build.sh export PHANTOM_JS=/home/q/sp

yuexuepeng的博客 891

php exec phantomjs,PHP+Phantomjs在Centos中的安装使用

参考:1.下载2.安装依赖yum install -y bzip2 # 安装bzip2yum install -y fontconfig freetype2yum install bitmap-fonts bitmap-fonts-cjkyum groupinstall "fonts" -y # 安装字体相关的依赖包fc-cache # 刷新字体缓存3.安装tar -jxvf phantomjs-...

weixin_30346025的博客 281

python在linux centos下安装phantomjs

(1)创建文件夹mkdir ~/myspace/(2)进入创建的文件夹cd ~/myspace/(3)下载phantomjs包wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2(4)解压phantomjs包tar -xjvf phantomjs-2.1.1-linux-x8

我不喜欢这个世界 1273

centOS安装phantomjs

centOS安装phantomjs wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2 tar jxvf phantomjs-1.9.8-linux-i686.tar.bz2 mv phantomjs-1.9.8-linux-i686 /usr/local/

dearfellow的专栏 329
上一篇: 运行Python程序的几种方式
下一篇: Linux常用命令:chmod修改文件权限 777和754
pythonw
博客等级 码龄10年 52粉丝 6原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值