运行 phantomjs 时出现错误
代码
var path = require('path');
var childProcess = require('child_process');
var phantomjs = require('/var/bin/node_modules/phantomjs25-beta/bin/phantomjs');
var binPath = phantomjs.path
console.log('test');
错误
# node phantomjs.js
test
/var/bin/node_modules/phantomjs25-beta/lib/phantom/bin/phantomjs: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
最佳答案
libjpeg.so.8 属于 Debian Jessie 环境。 您可以下载here库并将其放入应该需要的文件夹中。
关于node.js - phantomjs - 加载共享库时出错 : libjpeg. so.8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47291603/