Skip to content

Node support for apt #56354

Discussion options

You must be logged in to vote

Hi, @happybanana9 . Merry Christmas!
You have to follow steps below to fix this issue.

sudo apt update
sudo apt install -y build-essential fakeroot dpkg-dev

Download Node.js Source:
Get the source code for the version of Node.js you want to package.

VERSION=v16.16.0  # Replace with your desired version
wget https://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz
tar -xzf node-$VERSION.tar.gz
cd node-$VERSION

Build Node.js from source.

./configure
make -j$(nproc)

Install Node.js into a directory which will be used to create the .deb package.

mkdir -p ../nodejs-staging/usr/local
make install DESTDIR=$(pwd)/../nodejs-staging/usr/local

Create the necessary files for the .deb package.

    mk…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by happybanana9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants