3

在新机器上安装节点后遇到错误。

$ -node
node: error while loading shared libraries: libv8.so.3: cannot open shared object file: No such file or directory

我尝试使用http://code.google.com/p/v8/wiki/BuildingWithGYP中的说明安装 v8

但运气很少。对这个问题有任何帮助吗?

我的系统是:

SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 2

先感谢您

4

3 回答 3

1

我遇到了同样的问题,那个答案解决了它- 加载共享库时的Linux错误:无法打开共享对象文件:没有这样的文件或目录

长话短说 ,

$ locate libv8.so.3
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my_library/path.so.something
$ export LD_LIBRARY_PATH
$ ./my_app

GL,伊多

于 2015-03-07T10:14:26.610 回答
1

您安装的 Node RPM 依赖于libv8.so.3v8 RPM 中的模块。安装v8,然后搜索模块并将其复制到节点正在搜索模块的路径。使用 v8 的启用文件的路径编辑,~/.bash_profile以在机器上正确映射 v8。

$find / -name libv8.so*
$cp /the found path/libv8.so /node module path/
$find / -name enable | grep v8*
$vim /path to v8 enable file/enable (highlight the export PATH statements)
$vim ~/.bash_profile
Shift+I (paste in the contents of the v8 enable file)
于 2015-10-21T19:01:22.020 回答
0

I was using scl to load libs and encountered a similar problem. ended up starting my rails server after a deploy via:

# stop
pid=$(lsof -i tcp:3000 -t)
[ -z "$pid" ] || kill $pid

# start
scl enable rh-ror41 nodejs010 rh-ruby22 'LD_LIBRARY_PATH=/opt/rh/rh-ruby22/root/usr/lib64/:/usr/lib/oracle/12.1/client64/lib:/opt/rh/nodejs010/root/lib64 &
                                         bundle install &
                                         rails server -d -b 0.0.0.0'
于 2016-09-08T14:24:33.663 回答