Can't build Node.js on Ubuntu 10.04 - gcc

When I try to build Node.js on my Ubuntu 10.04 server it fails with the following error:
/etc/node/deps/v8/src/hydrogen.cc: In member function 'v8::internal::HInstruction* v8::internal::HGraphBuilder::BuildBinaryOperation(v8::internal::BinaryOperation*, v8::internal::HValue*, v8::internal::HValue*)':
/etc/node/deps/v8/src/hydrogen.cc:4912: internal compiler error: Segmentation fault
When building I ran the following commands:
git clone --depth 1 git://github.com/joyent/node.git
cd node
mkdir ~/local
./configure --prefix=$HOME/local/node
make
I also tried to compile it without setting --prefix and it worked. It didn't work to install it, though. Got this error when running make install:
Unable to install the file 'deps/uv/c-ares/ares_build.h' (not found in dir:///etc/node)
I have tried this with 0.4.8 and 0.4.0 but I get a segmentation fault on both of them.
Here is some more information:
OS: Ubuntu 10.04
Arch: x64
Node versions: 0.4.8 or 0.4.0
GCC version: 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
Any ideas?

I've just tried install node.js myself. The problem is that by default the branch points at master which is unstable. Before installing it call
$ git checkout origin/v0.4
$ ./configure
$ make
$ make install
Of course you also want to install npm after node because everyone loves it
$ curl http://npmjs.org/install.sh | sh

Related

Why won't CL code compile with npm v 12.22

When running make install on ubuntu server 20.04 the following error occurs:
error #: The engine "node" is incompatible with this module. Expected version "^16.0.0". Got "12.22.2"
and it exits.
node --version returns v12.22.2
yarn --version returns 1.22.17
go version go1.17.5 linux/amd64
This is new, I have some ansible spinning up cl nodes regularly and this worked when v 1.10 dropped a couple weeks back - not sure if something in my environment is causing it to fail or if something in code was revised in last few days?
Chainlink was recently updated to require nodejs 16LTS
https://github.com/smartcontractkit/chainlink/pull/5909
You should be able to update node via the following steps.
sudo apt update
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
sudo apt install -y nodejs
node -v

RuntimeError: <path> failed executing, please point LLVM_CONFIG to the path for llvm-config

Trying to install llvmlite via pip by running
pip install llvmlite
constantly gives me this error:
RuntimeError: <path> failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/Users/sfalk/miniconda3/envs/asr-service/bin/python' failed with exit status 1
----------------------------------------
Now, I am on Python 3.5
$ python --version
Python 3.5.6 :: Anaconda, Inc.
And just running pip install llvmlite will give me this:
RuntimeError: Building llvmlite requires LLVM 7.0.x, 7.1.x or 8.0.x, got '10.0.0'. Be sure to set LLVM_CONFIG to the right executable path.
I installed LLVM 8 via brew
brew install llvm#8
Setting LLVM_CONFIG to either does not work.
/usr/local/opt/llvm#8/bin (were I assumed llvm-config to be), or
/usr/local/opt/llvm#8/Toolchains/LLVM8.0.1.xctoolchain/usr/bin (where I actually found llvm-config to be)
And I keep getting some version of:
RuntimeError: /usr/local/opt/llvm#8/Toolchains/LLVM8.0.1.xctoolchain/usr/bin failed executing, please point LLVM_CONFIG to the path for llvm-config
What am I missing here?
And for those reviewing the post in search for a solution to installing numba, the version released on June 24, 2020 works:
pip install numba==0.50.1
Looks like there is an issue with latest version of llvmlite. Please consider using 0.31.0 version.
>>pip install llvmlite==0.31.0
Collecting llvmlite==0.31.0
Downloading
https://files.pythonhosted.org/packages/10/31/aa315fbc2e0b7777b95ce166b7c988f53e4cdd4c33d06eea24f395539eb4/llvmlite-0.31.0-cp35-cp35m-macosx_10_9_x86_64.whl (15.9MB)
100% |████████████████████████████████| 15.9MB 1.1MB/s
Installing collected packages: llvmlite
Successfully installed llvmlite-0.31.0
You will have to install the required llvm package using and link the executable config
sudo apt install llvm-**X**
and then
sudo pip3 install llvmlite
cd /usr/bin
sudo ln -s llvm-config-**X** llvm-config
This fixed the llvm issue of installing librosa on my raspberry pi (aarch64)
I was facing the same issue.
You will have to install the required llvm package using and link the executable config
sudo apt install llvm-X
and then
sudo pip3 install llvmlite
cd /usr/bin
sudo ln -s llvm-config-X llvm-config
did not work for me but I did notice we had the same output error
RuntimeError: <path> failed executing, please point LLVM_CONFIG to the path for llvm-config
So I thought: "why not point the LLVM_CONFIG to the proper llvm-config?".
And I did this simple fix:
export LLVM_CONFIG=/usr/bin/llvm-config-10

Could not execute command lessc' while running odoo (any version) in eclipse mac

After a thorough analysis of 'Could not execute command lessc' i've successfully ran odoo (any version) on my command line with python virtual env. Am doing this to run odoo in command line
$ . {PATH_TO_VIRTUAL_ENV}/bin/activate (Running the script in the current shell)
$ cd {PATH_TO_ODOO_SOURCE}
$ ./odoo.py -c setup.cfg
And the above runs with proper UI.
Now when trying to run the same from eclipse throws me 'Could not execute command lessc'. I did the below to run code from eclipse
Installed pydev plugin in eclipse Mars
Configured Python interpreter (Given the virtual env python path here. i.e {PATH_TO_VIRTUAL_ENV}/bin/python)
Setup odoo source
Specified the new python interpreter on the project properties -> python interpretor
Created a new Run Configuration to run the source with the custom setup file and with the new interpretor
Kindly throw me light on places where i miss. Also i've gone through links on setting up python virtual env in eclipse. They all say the same thing still this lessc dependency is somehow not linked. Please comment if you require more info to identify the error. Thanks for your help! :)
FYI am using mac.
Update
For Shikhar (based on his answer)
This problem is related to your bad configuration of Nodejs and less on system.
Use commands below to resolve this -
wget -qO- https://deb.nodesource.com/setup | sudo bash -
then
brew install node
and finally
sudo npm install -g less less-plugin-clean-css
This will resolve the lessc command issue.
try this
sudo apt-get install node-clean-css
sudo apt-get install node-less
The solution:
sudo apt-get install node-clean-css
sudo apt-get install node-less
may work for Global system installation but if you are working within a virtualenv you may try this.
If somebody had the issue inside PyCharm wich was my case and nothing else works...
I leave my solution here:
First: I tried to check if node and npm exist inside my virtualenv: node -v and npm -v, not any of them... Second: I was using virtualenv, also when I ask inside my virtualenv with: which lessc . I didn't receive any response neither, so... I keep googling and found this post: How to install lessc and nodejs in a Python virtualenv?
In any case this was what I did on my virtualenv and the problem was solved:
MYVIRTUALENV/bin/activate # switch to my Python virtualenv first
pip3.7 install nodeenv # install nodeenv nodeenv was installed, in case you are using python 2.x use pip instead pip3
nodeenv --python-virtualenv # Use current python virtualenv
npm install -g less # install lessc in the virtualenv
npm install -g less-plugin-clean-css # also install this less-plugin...
then if I check with node -v and npm -v I get a proper response...
also get good response on: which lessc
After that no more nightmare with lessc execution in pycharm

Unable to install latest ejabberd and Erlang version Ubuntu 14.04 LTS

Currently I have Erlang version 5.10.4 and OTP "R16B03".
Now I have to update Erlang from version 6.1 and OTP greater than 17.1 in Ubuntu 14.04 LTS (64 bit) in order to install the latest version of ejabberd (16.02).
For this I have tried instructions at this URL: http://erlang.org/doc/installation_guide/INSTALL.html
but when I am hitting the make command an error is coming:-
Makefile:247: /home/Hemant/otp_src_18.2/make/i686-pc-linux-gnu/otp_ded.mk: No such file or directory
make: *** No rule to make target `/home/Hemant/otp_src_18.2/make/i686-pc-linux-gnu/otp_ded.mk'. Stop.
I tried another way:
$ sudo apt-get install erlang
But I am getting the same version (Erlang 5.10) while I have updated the apt-get.
Now how can I get the latest version of Erlang?
When installing erlang do the following from this link:
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
Now the repository is added simply install esl-erlang with:
sudo apt-get update
sudo apt-get install esl-erlang
Installing ejabberd follow Mickaël's blog post:
git clone git#github.com:processone/ejabberd.git
cd ejabberd
chmod +x autogen.sh
./autogen.sh
./configure
sudo make && make install
Now I do remember getting quite a few compiler errors and all the errors were due to packages not being installed on my system. So when you receive an error from say libexpat then install the package sudo apt-get install libexpat1 and so on for all the following errors.
Good luck!
As your question is more on ejabberd than Erlang itself, you can download ejabberd prepackaged with its own Erlang version from ProcessOne site: https://www.process-one.net/en/ejabberd/downloads
If you want to learn about alternative ways to install ejabberd, you can follow the official documentation: https://docs.ejabberd.im/admin/guide/installation/
You can for example see at bottom of the page instructions to build ejabberd from source if you prefer.
I am trying to check the file in your error but I don't see it in the sources: https://github.com/erlang/otp/tree/OTP-18.2.4/make Can you try to clone it directly from GitHub and then compile? Or...
I recommend you to download Erlang packages specifically precompiled for Ubuntu from Erlang Solutions: https://www.erlang-solutions.com/resources/download.html
I was using them whenever I had to install Erlang on Ubuntu and never had problems. The codename for your Ubuntu would be Trusty Tahr.

PhoneGap Mac CLI local install failed because of Node version

So I want to debug my Phonegap webapp locally in Xcode.
I follow the step here and here, and launch in MAC CLI
$ sudo npm install -g phonegap
BUT install failed and CLI result get lots of errors with the first one is :
engine phonegap#2.9.0rc1-0.12.0: wanted: {"node":">=0.10.0"} (current: {"node":"v0.8.8","npm":"1.1.59"})
I understand my node version is too old : 0.8.8
node --version
I try to update but I am stuck with those 2 methods here and both in errors for me :
BREW
Tried Homebrew but did not work :
$ brew upgrade node
Error: node-0.8.8 already installed
NPM
As I found here
Upgrading Node.js to latest version
How do I update Node.js?
$ sudo npm install -g n
$ sudo n stable
sudo: n: command not found
In fact my bash_profile was missing the path to the n module as I found here:
cannot install npm? problems generating application
Edit your ~/.bash_profile. Add this export somewhere.
export PATH=/usr/local/bin:$PATH:/usr/local/share/npm/bin
I had the same issue and fixed it by upgrading node with brew, I just run
brew install --upgrade node

Resources