Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the slc command to work on Ubuntu?

I have installed Strongloop using npm install -g strongloop on my Ubuntu 14.04 server. The slc command does not work. It says

The program 'slc' is currently not installed. You can install it by typing: sudo apt-get install heimdal-multidev

How can I get it to run the Strongloop CLI instead of looking for this package? I have added this to my PATH and it still doesn't work. Any ideas?

Other Strongloop commands, like sl-build work and strongloop is listed in npm list -g.

like image 619
Antrikshy Avatar asked Mar 24 '15 00:03

Antrikshy


Video Answer


3 Answers

Ubuntu 14 with node.js 4.1.2

By default somehow slc is not created or not added to PATH. I solved this problem by adding symlink:

sudo ln -s /usr/lib/node_modules/strongloop/bin/slc.js /usr/bin/slc
like image 76
topazas Avatar answered Oct 01 '22 10:10

topazas


A soft link named slc should have been created at /usr/local/bin which will point to strongloop binary.

Please verify if the following exists.

/usr/local/lib/node_modules/strongloop/bin/slc

If no, then strongloop did not get installed successfully, otherwise verify the existence of the softlink slc at /usr/local/bin/.

/usr/local/bin/slc -> /usr/local/lib/node_modules/strongloop/bin/slc

If yes, then /usr/local/bin needs to be added to the $PATH, otherwise create the softlink and verify that /usr/local/binin $PATH.

like image 32
Sarbbottam Avatar answered Oct 01 '22 10:10

Sarbbottam


Looks like the Node installation that optionally comes with a Digital Ocean Droplet installs to a different location that's not in $PATH. I'm pretty sure that was the issue. Anyways, I fixed it by spinning up a server without Node pre-installed and followed this guide. Just use npm install -g strongloop instead of strong-cli because the latter has been deprecated.

like image 21
Antrikshy Avatar answered Oct 01 '22 12:10

Antrikshy