首先需要下载SpiderMonkey,目前最新版是1.8r,不过我选择的是1.7
wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
解压后安装
tar zxvf js-1.7.0.tar.gz
cd js/src
make -f Makefile.ref
拷贝libjs.so到/usr/lib
cp Linux_All_DBG.OBJ/libjs.so /usr/lib
ldconfig
拷贝所有头文件到/usr/include,里面的目录不要也可以
cp * /usr/include
至此准备工作完成,现在准备开始安装模块
从CPAN上下载JavaScript并安装,会出现以下选项
Is your SpiderMonkey compiled with JS_THREADSAFE (most things will fail if you answer wrong)? [y/N]
Is your SpiderMonkey compiled with support for unicode (t/23-unicode.t will fail if you answer wrong) ? [y/N] [N]
Do you want support for E4X (requires SpiderMonkey > 1.5) ? [y/N] [N] y
注意:此处选择前2个为y可能造成测试失败,如果你的SpiderMonkey是1.5以下版本,记得选n
等待编译完成即可。
wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
解压后安装
tar zxvf js-1.7.0.tar.gz
cd js/src
make -f Makefile.ref
拷贝libjs.so到/usr/lib
cp Linux_All_DBG.OBJ/libjs.so /usr/lib
ldconfig
拷贝所有头文件到/usr/include,里面的目录不要也可以
cp * /usr/include
至此准备工作完成,现在准备开始安装模块
从CPAN上下载JavaScript并安装,会出现以下选项
Is your SpiderMonkey compiled with JS_THREADSAFE (most things will fail if you answer wrong)? [y/N]
Is your SpiderMonkey compiled with support for unicode (t/23-unicode.t will fail if you answer wrong) ? [y/N] [N]
Do you want support for E4X (requires SpiderMonkey > 1.5) ? [y/N] [N] y
注意:此处选择前2个为y可能造成测试失败,如果你的SpiderMonkey是1.5以下版本,记得选n
等待编译完成即可。