Skip to content

Instantly share code, notes, and snippets.

@gilson27
Last active August 14, 2016 07:06
Show Gist options
  • Select an option

  • Save gilson27/fe6d6f50341ea41de86bd299c968803a to your computer and use it in GitHub Desktop.

Select an option

Save gilson27/fe6d6f50341ea41de86bd299c968803a to your computer and use it in GitHub Desktop.
Steps to install nodejs from source
#Change the filenames
NODE_TARRED="node-vx.y.z.tar.gz"
NODE_DIR="node-vx.y.z"
#Untar repository
tar -xvpf $NODE_TARRED
cd $NODE_DIR
#Create a directory to install binaries
mkdir install
DESTDIR=$(pwd)/install
#export compilation environment varibles
export CC=arm-gnueabi-linux-gcc
export CXX=arm-gnueabi-linux-g++
export LD=arm-gnueabi-linux-gcc
export AR=arm-gnueabi-linux-ar
export RANLIB=arm-gnueabi-linux-ranlib
#configure compilation options and install
./configure --dest-cpu=arm --dest-os=linux --prefix=/usr --without-snapshot
make
make install DESTDIR=$DESTDIR
#Change the filenames
NODE_TARRED="node-vx.y.z.tar.gz"
NODE_DIR="node-vx.y.z"
#Untar repository
tar -xvpf $NODE_TARRED
cd $NODE_DIR
#Configure compilation options and install
./configure
make
##No sudo assuming root access
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment