Jithin Justice
Jithin Justice

Reputation: 241

How to install AWS SAM Local on Ubuntu 16.04?

I am trying to install AWS SAM (Serverless Application Model) Local on Ubuntu 16.04.

I tried to install SAM Local using NPM with the following command.

npm install -g aws-sam-local

I got the following error.

enter image description here

Please help me to sort it out?

Upvotes: 2

Views: 4374

Answers (5)

eSlider
eSlider

Reputation: 301

Installation on Ubuntu 16.04/18.04

sudo apt-get install python3-pip -y
sudo -H python3 -m pip install aws-sam-cli

Upvotes: 4

Awais
Awais

Reputation: 41

If issue with current user permissions, please use sudo with below commands First try,

npm config set unsafe-perm=true

Then,

npm install -g go-npm

finally, npm install -g aws-sam-local

It will also work for mac.

Upvotes: 0

Tom
Tom

Reputation: 21

First try

npm config set unsafe-perm=true

I also installed node v8.11.1

Upvotes: 2

Niroshan Ranapathi
Niroshan Ranapathi

Reputation: 3047

first try

npm install -g go-npm 

then npm install -g aws-sam-local

Upvotes: 0

Steve Buzonas
Steve Buzonas

Reputation: 5700

The standard shebang for node is #!/usr/bin/env node. There is a package conflict with the name node, so it's named nodejs.

You can solve the issue with a symlink using alternatives.

sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

Upvotes: 1

Related Questions