Learn how to install sar utility in SUSE Linux. Also, lists commands to enable sar to collect monitoring data in background.
sar
is a monitoring utility mostly native to Linux. But with SUSE Linux you can not find sar
pre-installed. There you will see error like one below :2 4 | root@kerneltalks# sar If'sar'isnotatypo you can usecommand-not-found tolookup the packagethat contains it,like this: |
Read our articles regarding sar tool :
How to install sar in SUSE Linux
To make
sar
available on SUSE, you need to install package named sysstat
. If you have zypper repo configured then you can directly run below command :2 4 6 8 10 12 14 16 18 20 | root@kerneltalks# zypper in sysstat Refreshing service'SUSE_Linux_Enterprise_Server_12_SP3_x86_64'. Reading installed packages... sysstat 1newpackagetoinstall. Overall download size:358.7KiB.Already cached:0B.After the operation, Continue?[y/n/...?shows all options](y):y (1/1),358.7KiB(1.3MiB unpacked) Retrieving:sysstat-12.0.2-10.15.1.x86_64.rpm..............[done(160.0KiB/s)] Checking forfileconflicts:.............................................[done] (1/1)Installing:sysstat-12.0.2-10.15.1.x86_64..........................[done] |
If zypper repo is not configured you can download appropriate rpm for your kernel version and install using rpm command. We used SUSE12SP3 here for demonstration.
Once done you need to start
sysstat
service so that it will start collecting monitoring data in background. Also, enable this service at boot so that after reboot it starts itself and keep on collecting data in background.2 4 | // place code for your default task here |
and then run
gulp
command in the current working directory.Test Gulp
We can see from output that Gulp is installed successfully
Hi @zdne I have exactly the same configuration, and xcode cli tools installed, but having the following issue when I try to run 'npm install protagonist'
npm http GET https://registry.npmjs.org/protagonist
npm http 304 https://registry.npmjs.org/protagonist
npm http 304 https://registry.npmjs.org/protagonist
[email protected] install /Users/mustela/node_modules/protagonist
node-gyp rebuild
node-gyp rebuild
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/HTTP.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/MarkdownBlock.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/MarkdownParser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Parser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/ParserCore.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Serialize.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeJSON.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeYAML.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/UriTemplateParser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/csnowcrash.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CBlueprint.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CSourceAnnotation.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/posix/RegexMatch.o
LIBTOOL-STATIC Release/snowcrash.a
libtool: unrecognized option
make: *** [Release/snowcrash.a] Error 1
gyp ERR! build error
gyp ERR! stack Error:
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command 'node' '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js' 'rebuild'
gyp ERR! cwd /Users/xxxx/node_modules/protagonist
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install:
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the protagonist package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls protagonist
npm ERR! There is likely additional logging output above.
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/MarkdownBlock.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/MarkdownParser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Parser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/ParserCore.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Serialize.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeJSON.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeYAML.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/UriTemplateParser.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/csnowcrash.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CBlueprint.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CSourceAnnotation.o
CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/posix/RegexMatch.o
LIBTOOL-STATIC Release/snowcrash.a
libtool: unrecognized option
-static' libtool: Try
libtool --help' for more information.make: *** [Release/snowcrash.a] Error 1
gyp ERR! build error
gyp ERR! stack Error:
make
failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command 'node' '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js' 'rebuild'
gyp ERR! cwd /Users/xxxx/node_modules/protagonist
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the protagonist package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls protagonist
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command 'node' '/usr/local/bin/npm' 'install' 'protagonist'
npm ERR! cwd /Users/xxxx
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/xxxx/npm-debug.log
npm ERR! not ok code 0
npm ERR! command 'node' '/usr/local/bin/npm' 'install' 'protagonist'
npm ERR! cwd /Users/xxxx
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/xxxx/npm-debug.log
npm ERR! not ok code 0
I had some issues trying to install Node on Windows 10 and found the solution.
The error was as follows:
C:UsersStephan>npm
Error: ENOENT, stat 'C:UsersStephanAppDataRoamingnpm'
Error: ENOENT, stat 'C:UsersStephanAppDataRoamingnpm'
The solution is below.
neophyte5,2552 gold badges16 silver badges38 bronze badges
Stephan BijzitterStephan Bijzitter2,9093 gold badges17 silver badges41 bronze badges
8 Answers
Edit:It seems like new installers do not have this problem anymore, see this answer by Parag Meshram as my answer is likely obsolete now.
Original answer:
Follow these steps, closely:
- http://nodejs.org/download/ download the 64 bits version, 32 is for hipsters
- Install it anywhere you want, by default:
C:Program Filesnodejs
- Control Panel -> System -> Advanced system settings -> Environment Variables
- Select
PATH
and choose to edit it.
If the PATH variable is
empty
, change it to this: C:Users{YOUR USERNAME HERE}AppDataRoamingnpm;C:Program Filesnodejs
If the PATH variable already contains
C:Users{YOUR USERNAME HERE}AppDataRoamingnpm
, append the following right after: ;C:Program Filesnodejs
If the PATH variable contains information, but nothing regarding npm, append this to the end of the PATH:
;C:Users{YOUR USERNAME HERE}AppDataRoamingnpm;C:Program Filesnodejs
Now that the PATH variable is set correctly, you will still encounter errors. Manually go into the AppData directory and you will find that there is no npm directory inside Roaming. Manually create this directory.
Re-start the command prompt and npm will now work.
Community♦
Stephan BijzitterStephan Bijzitter2,9093 gold badges17 silver badges41 bronze badges
go to http://nodejs.org/
and hit the button that says 'Download For ..'
This'll download the .msi (or .pkg for mac) which will do all the installation and paths for you, unlike the selected answer.
foreyezforeyez20.9k55 gold badges160 silver badges252 bronze badges
In addition to the answer from @StephanBijzitter I would use the following
PATH
variables instead:So your new
PATH
would look like:This has the advantage of neiter being user dependent nor 32/64bit dependent.
DunkenDunken6,0954 gold badges46 silver badges71 bronze badges
New installers (.msi downloaded from https://nodejs.org) have 'Add to PATH' option. By default it is selected. Make sure that you leave it checked.
activedecay3,8453 gold badges23 silver badges40 bronze badges
Parag MeshramParag Meshram5,4766 gold badges43 silver badges80 bronze badges
You should run the installer as administrator.
- Run the command prompt as administrator
- cd directory where msi file is present
- launch msi file by typing the name in the command prompt
- You should be happy to see all node commands work from new command prompt shell
arunramarunram
I had the same problem, what helped we was turning of my anti virus protection for like 10 minutes while node installed and it worked like a charm.
Adeel ImranAdeel Imran3,8731 gold badge25 silver badges47 bronze badges
Everything should be installed in %appdata% (C:UsersAppDataRoaming), not 'program files'.
Here's why..
The default MSI installer puts Node and the NPM that comes with it in 'program files' and adds this to the system path, but it sets the user path for NPM to %appdata% (c:users[username]appdataroaming) since the user doesn't have sufficient priveleges to write to 'program files'.
This creates a mess as all modules go into %appdata%, and when you upgrade NPM itself - which NPM themselves recommend you do right away - you end up with two copies: the original still in 'program files' since NPM can't erase that, and the new one inn %appdata%.
Sims 4 best mods. Even worse, if you mistakenly perform NPM operations as admin (much easier on Windows then on *nix) then it will operate on the 'program files' copy of NPM node_modules. Potentially a real mess.
So, when you run the installer simply point it to %appdata% and avoid all this.
And note that this isn't anything wierd - it’s what would happen if you ran the installer with just user priveleges.
TomTom12.5k4 gold badges50 silver badges63 bronze badges
The reason why you have to modify the AppData could be:
- Node.js couldn't handle path longer then 256 characters, windows tend to have very long PATH.
- If you are login from a corporate environment, your AppData might be on the server - that won't work. The npm directory must be in your local drive.
Even after doing that, the latest LTE (4.4.4) still have problem with Windows 10, it worked for a little while then whenever I try to:
Node throw the 'FATAL ERROR CALL_AND_RETRY_LAST Allocation failed - process out of memory' error. Still try to find a solution to that problem.
The only thing I find works is to run Vagrant or Virtual box, then run the Linux command line (must matching the path) which is quite a messy solution.
Joel ChuJoel Chu
Not the answer you're looking for? Browse other questions tagged node.jswindowsnpminstallation or ask your own question.
Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine…. Chrome V8 engine is a Google’s open source high-performance JavaScript engine written in C++ and used in Google Chrome, the open source projects….
V8 engine works on Windows and Linux systems… and can be used to build fast and scalable applications…
This brief tutorial is going to show students and new users how to easily install the latest Node.js and NPM packages on Ubuntu 16.04 | 18.04 LTS servers… Although Node.js comes in Ubuntu default repositories, if you want to get the latest version, you’ll have to add its official PPA…
For more about Node.js, please visit the project’s homepage…
To get started with install Node.js and NPM, follow the steps below:
Step 1: Add Node.js PPA
Before installing the latest version of Node.js, you must add its PPA to Ubuntu… This repository is provided by the official package mainterner… To add the repository, run the commands below….
sudo apt install curl
There are two repositories you can install… one repository contains the latest Node.js packages and the other has the LTS or (Long Term Support) packages…. if you need the latest and greatest, then install the first repository…
On the other hand, if you need a more stable and tested Node.js packages, then install the LTS repository….
Then for the Latest release, add this PPA.
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
To install the LTS release, use this PPA
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
After that, you can now install latest version of Node.js from the particular repository you choose… If you add both repositories, the latest version of Node.js will be installed and not the LTS…
Step 2: Install Node.js and NPM
To install, run the commands below
sudo apt install nodejs
After installing, both Node.js and NPM modules should be installed and ready to use….
You can use the commands below to view the version number installed….
To test whether the web server is properly installed, run the commands below to create a test file called http_server.js in your home folder…
Then copy and paste the content below into the file and save….
After that save the file and run the commands below to start the server….
node http_server.js
You should see an output that reads:
Server running at http://127.0.0.1:3000/
Now open your browser and browse to the server hostname or IP address followed by port 3000… and you should see a default page with Hello World
http://localhost:3000
Enjoy!
Hwo To Install Npm Suse 7
You may also like the post below: