如何在路由器上安装node.js华硕RT-N18U(带ARMv7l处理器)

时间:2015-11-17 15:54:17

标签: node.js installation arm router

我想在ASUS RT-N18U上使用番茄固件版本1.28由Shibby安装node.js(http://tomato.groov.pl/download/K26ARM/132/tomato-RT-N18U-ARM--132-AIO-64K.zip

硬件配置

root@unknown:/# cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1599.07

Features        : swp half thumb fastmult edsp
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : Northstar Prototype
Revision        : 0000
Serial          : 0000000000000000

尝试1:

root@unknown:/# cd /opt
root@unknown:/opt# wget node-v4.2.1-linux-armv7l.tar.gz
root@unknown:/opt# tar zxvf node-v4.2.1-linux-armv7l.tar.gz
root@unknown:/opt# cd node-v4.2.1-linux-armv7l/bin
root@unknown:/opt/node-v4.2.1-linux-armv7l/bin# ls -l
  -rwxr-xr-x    1 root     root      20958710 Sep 23 03:55 node
  lrwxrwxrwx    1 root     root            38 Sep 24 17:47 npm -> ../lib/node_modules/npm/bin/npm-cli.js
root@unknown:/opt/node-v4.2.1-linux-armv7l/bin# ./node
  -sh: ./node: not found

结果: 文件"节点"在目录中存在,但系统显示"未找到"。

尝试2:

我已经下载并解压缩了TomatoWare(最新版本1.0.3),然后编译了最新版本node.js

root@unknown:/opt/node-v4.2.1# ./configure --prefix=/opt/node && make && make install
...
root@unknown:/opt/node/bin# ./node -v
v4.2.1
root@unknown:/opt/node/bin# ./node
Illegal instruction

当我删除了TomatoWare的所有文件

root@unknown:/opt/node/bin# ./node
-sh: ./node: not found

所以与第一种情况相同的错误!

通过 root @ unknown:/ opt #ldd / opt / node / bin / node node需要一些来自TomatoWare的库。

将这些文件复制到/ opt / lib:

之后
root@unknown:/opt/lib# ls -l
  -rwxr--r--    1 root     root         28701 Sep  3 18:51 ld-uClibc.so.0
  -rwxr--r--    1 root     root        576031 Sep  3 18:51 libc.so.0
  -rwxr--r--    1 root     root         16129 Sep  3 18:51 libdl.so.0
  -rwxr--r--    1 root     root       1344500 Sep  3 18:51 libgcc_s.so.1
  -rwxr--r--    1 root     root         92168 Sep  3 18:51 libm.so.0
  -rwxr--r--    1 root     root        113786 Sep  3 18:51 libpthread.so.0
  -rwxr--r--    1 root     root         19328 Sep  3 18:51 librt.so.0
  -rwxr--r--    1 root     root       4079041 Sep  3 18:51 libstdc++.so.6

然后

root@unknown:/opt/node/bin# ./node
  Illegal instruction

尝试3:

我安装了Optware-ng(https://www.hqt.ro/how-to-install-new-generation-optware/

root@unknown:/# cd /opt
root@unknown:/opt# wget -c -O optware-ng-arm-setup.sh
root@unknown:/opt# chmod +x ./optware-ng-arm-setup.sh
root@unknown:/opt# ./optware-ng-arm-setup.sh
root@unknown:/opt# ipkg update
root@unknown:/opt# ipkg install gcc
root@unknown:/opt# ipkg install make
root@unknown:/opt# ipkg install python27
root@unknown:/opt# gcc --version
gcc (GCC) 5.2.0
root@unknown:/opt# wget node-v4.2.1.tar.gz
root@unknown:/opt# tar xzvf node-v4.2.1.tar.gz
root@unknown:/opt# cd node-v4.2.1
root@unknown:/opt/node-v4.2.1# ./configure --prefix=/opt/node
root@unknown:/opt/node-v4.2.1# make

结果:

/opt/node-v4.2.1/out/Release/obj.target/deps/gtest/libgtest.a(gtest.o): In function `testing::UnitTest::GetInstance()':
gtest.cc:(.text._ZN7testing8UnitTest11GetInstanceEv+0x78): undefined reference to `atexit'
collect2: error: ld returned 1 exit status
cctest.target.mk:118: recipe for target '/opt/node-v4.2.1/out/Release/cctest' failed
make[1]: *** [/opt/node-v4.2.1/out/Release/cctest] Error 1
make[1]: Leaving directory '/opt/node-v4.2.1/out'
Makefile:45: recipe for target 'node' failed
make: *** [node] Error 2

尝试4:

我安装了Debian,并在其中安装了nodejs

root@unknown:/# debian enter
root@unknown:/# apt-get update && apt-get upgrade
root@unknown:/# apt-get install nodejs
root@unknown:/# nodejs -v
v4.1.1
root@unknown:/# nodejs
Illegal instruction

请告诉我,我做错了什么?

0 个答案:

没有答案