I have been trying to install NODEJS on remote AWS instance of Red Hat Enterprise Linux 7.1
I had read some of the posts here and been on the node js website
I have tried t
curl --silent --location https://rpm.nodesource.com/setup | bash -
but then get the error
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
i even get this error if i run
sudo curl --silent --location https://rpm.nodesource.com/setup | bash -
I have also tried to change the permissions on that file but then it still doesnt install
Can someone suggest a better way / correct way of doing this?
Thanks
Install Node.js on Red Hat Enterprise Linux. 1. Enable Node.js Red Hat Software Collection. 2 minutes. In this step you will configure your system to obtain software, including the latest dynamic ... 2. Setup your Node.js development environment. 3. Hello World and your first Node.js application.
The following procedure helps you install Node.js on an Amazon Linux instance. You can use this server to host a Node.js web application. Connect to your Linux instance as ec2-user using SSH. Install node version manager (nvm) by typing the following at the command line. AWS does not control the following code.
To set up Node.js on your Linux instance. Connect to your Linux instance as ec2-user using SSH. Install node version manager (nvm) by typing the following at the command line. Warning. AWS does not control the following code. Before you run it, be sure to verify its authenticity and integrity.
To install Node.js on CentOS 6, 7 and 8, and older versions of Red Hat: $ sudo yum install epel-release $ sudo yum install nodejs # also installs npm To install Node.js on Arch Linux and Manjaro: $ sudo pacman -S nodejs # also installs npm
You just don't have permissions to install things. It doesn't matter you are running curl with sudo, because what really needs superuser permissions is the bash session inside which you run the script.
So, this would work.
curl --silent --location https://rpm.nodesource.com/setup | sudo bash -
At least on one of our ESXi RedHat virtual machines the easiest way I know to install nodejs is:
yum install epel-release
yum install nodejs
Let yum do all the heavy lifting :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With