Brew install node --without-npm fails - node.js

Following John Papa's post on 'How to use npm global without sudo on OSX' and I am running
brew install node --without-npm
I get this info/error(s):
/usr/local > brew install node --without-npm
==> Downloading https://nodejs.org/dist/v5.10.1/node-v5.10.1.tar.xz
Already downloaded: /Library/Caches/Homebrew/node-5.10.1.tar.xz
==> Downloading https://ssl.icu-project.org/files/icu4c/56.1/icu4c-56_1-src.tgz
Already downloaded: /Library/Caches/Homebrew/node--icu4c-56.1.tgz
==> ./configure --prefix=/usr/local/Cellar/node/5.10.1 --without-npm --with-intl
==> make install
Last 15 lines from /Users/justin/Library/Logs/Homebrew/node/02.make:
#include <limits>
^
In file included from ../deps/gtest/src/gtest-death-test.cc:34:
In file included from ../deps/gtest/include/gtest/gtest-death-test.h:41:
In file included from ../deps/gtest/include/gtest/internal/gtest-death-test-internal.h:40:
In file included from ../deps/gtest/include/gtest/internal/gtest-internal.h:40:
../deps/gtest/include/gtest/internal/gtest-port.h:259:10: fatal error: 'ctype.h' file not found
#include <ctype.h> // for isspace, etc
^
1 error generated.
make[1]: *** [/private/tmp/node20160410-11435-157r8bn/node-v5.10.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-filepath.o] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[1]: *** [/private/tmp/node20160410-11435-157r8bn/node-v5.10.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o] Error 1
make: *** [node] Error 2
Following Homebrew's troubleshooting instructions, I ran brew update twice and brew doctor -- but still no luck. I'm not familiar with homebrew and haven't messed with this stuff in a while. Any ideas what these errors mean?

It seems you did not install command line developer tools. Before installing Node with Homebrew, try executing this command in your Terminal:
xcode-select --install
If it is installed successfully this message will be shown:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
After the installation, run the brew command again.
The ctype.h file should be somewhere like /usr/include/ctype.h.

Related

Error while installing bedtools via cygwin commands: fatal error: zlib.h: No such file or directory

I'm trying to install the bedtools v2.27.0 via Cygwin. Here are the commands I've tried:
$ wget https://github.com/arq5x/bedtools2/releases/download/v2.27.0/bedtools-2.27.0.tar.gz
$ tar -zxvf bedtools-2.27.0.tar.gz
$ cd bedtools2
$ make
when running the last command, I get the following error:
*fatal error: zlib.h: No such file or directory
*#include <zlib.h>*
^
compilation terminated.
make[1]: *** [Makefile:37: ../../../obj//FileRecordMgr.o] Error 1
make: *** [Makefile:187: src/utils/FileRecordTools] Error 2*
I tried downloading the libz package using the following command:
$ apt-cyg install libz-dev
but it didn't work. I got the following error:
Unable to locate package libz-dev
Note that I'm using Cygwin terminal on windows (64-bit machine). Your help is highly appreciated.
To install packages use cygwin setup, or at least find the right package name before using apt-cyg
To find the package containing zlib.h header:
$ cygcheck -p include/zlib.h
Found 10 matches for include/zlib.h
...
zlib-devel-1.2.11-1 - zlib-devel: gzip de/compression library (development)
..
So you need to install zlib-devel

install node js in aws linux instance

in linux instance to aws:
i make step by step this tutorial http://iconof.com/blog/how-to-install-setup-node-js-on-amazon-aws-ec2-complete-guide/ but when i went to install npm i couldn't the console show me this error:
scripts/doc-build.sh doc/cli/npm-help-search.md man/man1/npm-help-search.1
make[1]: Entering directory `/var/www/html/npm'
node cli.js install marked-man --no-global
bash: node: command not found
make[1]: *** [node_modules/.bin/marked-man] Error 127
make[1]: Leaving directory `/var/www/html/npm'
make: *** [man/man1/npm-help-search.1] Error 2
I am guessing that you started with a new instance and did not update it with latest updates or package sources first. You are missing the source for NodeJS packages.
This will add the source and install nodejs:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Follow this: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Redis - linux / Error when Installing redis on linux: `cc: command not found`

I wish to install redis on my red-hat environment. I do the following:
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
I got the next error:
make[3]: *** [net.o] Error 127
make[3]: Leaving directory `/tmp/redis-stable/deps/hiredis'
make[2]: *** [hiredis] Error 2
make[2]: Leaving directory `/tmp/redis-stable/deps'
make[1]: [persist-settings] Error 2 (ignored)
CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/tmp/redis-stable/src'
make: *** [all] Error 2
How can I fix it?
You are trying to install redis from source code. What this process do is to compile and create executable on your machine and then install it. For doing this you need various tools like gcc etc. Best way is to install all of them together by installing that group. Run this from terminal
yum grouplist
This will show all groups available and then choose group you want to install or run directly
yum groupinstall 'Development Tools'
This will save you from other problems which might come in future while installing from source.
for those of you who encounter this error
check this github issue
before make run this command
$ cd deps; make hiredis lua jemalloc linenoise
Install build essential first
sudo apt-get install build-essential
then install the dependencies
cd deps
make hiredis lua jemalloc linenoise
If you're not an advanced user maybe it is not a good idea to install REDIS from the source.
Instead you should install a packaged version. For example on Fedora / Centos / RHEL:
sudo yum install redis
Come out from your extracted folder/Dir and remove the extracted redis-x.x.x folder with rm -rf redis-x.x.x
now again extract the redis folder with tar xzf redis-x.x.x.tar.gz
go to redis directory again and run the make or make test again. it works for me.

How to install valgrind properly?

I'm installing valgrind now, until the ‘make install’ command it goes good.
The next command- ‘make regtest’ outputs the next error:
../../depcomp: line 689: exec: g++: not found
make[5]: *** [leak_cpp_interior.o] Error 127
make[5]: Leaving directory `/home/kbubuntu/valgrind-3.9.0/memcheck/tests'
make[4]: *** [check-am] Error 2
make[4]: Leaving directory `/home/kbubuntu/valgrind-3.9.0/memcheck/tests'
make[3]: *** [check-recursive] Error 1
make[3]: Leaving directory `/home/kbubuntu/valgrind-3.9.0/memcheck/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/kbubuntu/valgrind-3.9.0/memcheck'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/kbubuntu/valgrind-3.9.0'
make: *** [check] Error 2
How can I solve it?
Thanks.
Short answer: Make from source.
How?
Uninstall the non working valgrind version with root rights (eg. sudo):
apt-get --purge valgrind
or
dpkg --remove valgrind
or
yum remove valgrind
Obtain sources from here.
Identify the latest version (for example 3.17.0)
Download sources : wget https://sourceware.org/pub/valgrind/valgrind-3.17.0.tar.bz2
Decompress archive tar xvf valgrind-3.17.0.tar.bz2
Go to uncompressed archive cd valgrind-3.17.0
Configure ./configure
Compile make
Install make install (with root rights, eg. sudo)
Note: very useful for Raspberry Pi 4 users - Default valgrind installation generate a lot of internal errors. See Valgrind reports hundreds of errors in Hello World program on RaspberryPi 4B
All major linux distributions will include valgrind in their repositories. You can find this on debian derived, apt based systems with:
apt search valgrind
But first just try:
apt install valgrind
It should work, and pull in any dependencies. Remember, if you are not the superuser, you'll need to preface those with sudo.
It's a great tool, have fun.
i think its due to dependency not met.
install g++
by
sudo apt-get install g++
then try again.
error is due to exec is unable to find any package named g++
When trying to install Valgrind in Ubuntu 20.04, you can use apt or snap (notice the version number):
:~/valgrind-3.18.1$ valgrind
Command 'valgrind' not found, but can be installed with:
sudo snap install valgrind # version 3.18.1, or sudo apt install
valgrind # version 1:3.15.0-1ubuntu9.1
Although snap provides the latest version, I preferred to install it natively by compiling the source code following the #g10guang instructions.

fix gnuplot installation

My gnuplot installation fails because libjpeg cannot not be loaded.
$ gnuplot
dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /usr/local/bin/gnuplot
Reason: image not found
Trace/BPT trap: 5
I work with osx-mavericks + XCode 5.1. Gnuplot was first installed in the past under osx-mountain-lion with homebrew. And under mountain-lion it worked. I tried to reinstall it now under mavericks, but it does not help.
brew reinstall gnuplot --tests
==> Reinstalling gnuplot with --tests
..
==> make
==> make check
Reason: image not found
/bin/sh: line 1: 30700 Trace/BPT trap: 5 PATH=$bdir/../src:$PATH GNUPLOT_DRIVER_DIR=$bdir/../src GNUPLOT_LIB=. gnuplot all.dem < /dev/null
make[2]: *** [check-noninteractive] Error 133
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1
Additional info: brew install libjpeg says "jpeg-8d already installed" but I can't find libjpeg. I only find several versions of libpng.
$ brew install libjpeg
Warning: jpeg-8d already installed
P.S. I am not firm with the console. So I am thankful for even simple console tips that help me debug the problem.
$ brew reinstall jpeg
solved the problem for me. After this I could reinstall gnuplot with
brew reinstall gnuplot --cairo --with-x --tests
I assume other reinstall options will work too.
Seems like bug in the brew recipe for gunplot.
At least I expect a better error message.

Resources