Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing NODEJS on remote AWS instance of Red Hat Enterprise Linux 7.1

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

like image 304
Dan Avatar asked Aug 12 '15 01:08

Dan


People also ask

How to install Node JS on Red Hat Enterprise Linux?

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.

How to install NodeJS on Amazon Linux instance?

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.

How to set up NodeJS on AWS EC2 instance?

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.

How do I install NodeJS on CentOS 7?

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


2 Answers

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 -
like image 125
Edson Marquezani Filho Avatar answered Sep 24 '22 02:09

Edson Marquezani Filho


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 :)

like image 25
yerviz Avatar answered Sep 23 '22 02:09

yerviz