Search code examples
node.jsnpmcloud9-idebeagleboneblackbeagleboard

nodejs Install issue on my BeagleBone Green


I want to develop my ReactJs and Nodejs application on my BeagleBone Green card using cloud9 so I had this error every time I install nodejs or execute a command using npm.

https://i.sstatic.net/Ie095.png

Any help would be greatly appreciated.

Thanks.


Solution

  • Your node executable has been built to require newer versions of libstdc++ (the GNU standard C++ library) and libc (the GNU standard C library) than the ones that are installed on your BeagleBone.

    To fix, you'll need to download newer versions of those libraries and make them available to node. From the information at https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html it appears that you need at least libstdc++.so.6.0.20 and at least libc-2.16.

    There's some risk involved in changing the system libraries on a running system. The way to do it is to put the new libraries next to the old ones (do not delete or rename the old ones) and then remake the existing libstdc++.so.6 and libc.so.6 symlinks to point to the new libraries. The symlinks are what programs follow to get to the actual libraries. (If you look at those symlinks you'll see that right now they point to the old libraries.) You have to remake the symlinks in one command, and if remaking the libc symlink fails then you'll be in deep trouble.

    If you can get the newer libraries from properly-built packages then that should be a safer approach than trying to do it manually, because the packages should take care of the relinking for you.

    Alternatively you can put the new libraries in some directory separate from the system libraries, make new libstdc++.so.6 and libc.so.6 symlinks in that directory, and then use the LD_LIBRARY_PATH environment variable to cause node and npm to look for them in that location. That's much safer, but a little ugly.