[英][Error: PhantomJS exited with return value 127]
I have the following code that generates a webshot of my site. 我有以下代码生成我的网站的网络快照。 It works on my local machine(Windows environment) but on test server which is linux I get PhantomJS exited with return value 127. What does this error mean and how can I resolve it? 它可以在我的本地计算机(Windows环境)上运行,但是在Linux的测试服务器上,我退出PhantomJS,返回值127。此错误是什么意思,我该如何解决?
webshot(url, fileName, options, function(err) {
if(!err){
fs.readFile(fileName, function (err,data) {
if (err) {
console.log(fileName);
return console.log(err);
}
fs.unlinkSync(fileName);
fut.return(data);
});
}else{
console.log(url);
console.log(err);
fut.return("Error Occurred");
}
});
Phantomjs was not installed on the linux server. Phantomjs尚未安装在Linux服务器上。 Installation solved my issue. 安装解决了我的问题。
The problem for me was that I needed to install an additional library, which was fontconfig. 对我来说,问题是我需要安装一个额外的库,即fontconfig。
Source information: http://phantomjs.org/download.html 源信息: http : //phantomjs.org/download.html
I had the same problem in Debian. 我在Debian中遇到了同样的问题。 Installing Phantom with "apt-get install phantomjs" solved the problem. 使用“ apt-get install phantomjs”安装Phantom解决了该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.