Linuxbrew-core: node: always fails to install on Ubuntu 16.04

Created on 7 Aug 2017  Â·  7Comments  Â·  Source: Homebrew/linuxbrew-core

Please always follow these steps:

  • [x] Confirmed this is a problem with brew installing one, specific formula and not every time you run brew? If it's a general brew problem please file this issue at https://github.com/Linuxbrew/brew/issues/new.
  • [x] Ran brew update and retried your prior step?
  • [x] Ran brew doctor, fixed all issues and retried your prior step?
  • [x] Ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] If brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
  • What happened (include command output)
  • What you expected to happen
  • Step-by-step reproduction instructions (by running brew install commands)

What I was doing: Trying to install the latest version of Node on my Ubuntu 16.04 instance
What I expected to happen: A successful install
What happened: Consistently fails every time, even when new minor releases or patches are released into the taps. Command output (plus brew gist-logs node) below:

~ $ time brew install node
Error: node 7.10.0 is already installed
To upgrade to 8.2.1, run `brew upgrade node`
brew install node  0.53s user 0.08s system 64% cpu 0.956 total
~ $ time brew upgrade node
==> Upgrading 1 outdated package, with result:
node 8.2.1
==> Upgrading node
==> Downloading https://nodejs.org/dist/v8.2.1/node-v8.2.1.tar.xz
Already downloaded: /home/ubuntu/.cache/Homebrew/node-8.2.1.tar.xz
==> ./configure --prefix=/home/ubuntu/.linuxbrew/Cellar/node/8.2.1 --without-npm
==> make install

At this point, after a good half hour or so, PuTTY gave me a "Network error: Software caused connection abort" and stopped the connection. Sometimes it gives me a lot more error output, sometimes it doesn't. In any case, here's the output of brew gist-logs node.

Steps to reproduce: I'm not sure about this. Try brew install node or brew upgrade node on Ubuntu 16.04 for yourself and see if this happens to you. If I get error output the next time I try this, I'll update the issue with it.

outdated

Most helpful comment

Alrighty then... it turns out I had a very old installation that didn't let me choose to install to /home/linuxbrew/.linuxbrew, so I was stuck with ~/.linuxbrew. Uninstalled, reinstalled, and brew install node was a success!

All 7 comments

Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like node.
Another possible workaround for you is brew install --force-bottle node, but no promises.

The precompiled binary bottles of non-relocatable bottles can only be used if you install in /home/linuxbrew/.linuxbrew, otherwise they have to be built from source. See the documentation below, but wherever it reads /usr/local, which is for macOS, read instead /home/linuxbrew/.linuxbrew.

I don't see any obvious errors in the gist that you posted. Please report the output of

brew list --versions node

It may possibly be an issue with Putty and your connection to your server. If so, try…

nohup brew install node >brew-install-node.log

If your connection is broken, brew install node should keep running on the server. You can log back in and run

tail -f brew-install-node.log

to see how it's progressing.

Interestingly enough, it seems to have resolved itself, perhaps behind the scenes while the PuTTY connection was broken. I now only have node v8.2.1 (the latest) available to me. We'll see what happens the next time an update comes around, and I'll keep what you posted in mind.

Well, it happened again. Gist output is here.

Command line output here:

==> make install
Last 15 lines from /home/ubuntu/.cache/Homebrew/Logs/node/02.make:
../deps/v8/src/objects-inl.h:1416:65: warning: 'cell' may be used uninitialized in this function [-Wmaybe-uninitialized]
   return reinterpret_cast<Object**>(FIELD_ADDR(obj, byte_offset));
                                                                 ^
../deps/v8/src/objects.cc:20139:11: note: 'cell' was declared here
   Object* cell;
           ^
g++-5: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
deps/v8/src/v8_base.target.mk:612: recipe for target '/tmp/node-20170813-5293-aaabtc/node-v8.3.0/out/Release/obj.target/v8_base/deps/v8/src/objects.o' failed
make[1]: *** [/tmp/node-20170813-5293-aaabtc/node-v8.3.0/out/Release/obj.target/v8_base/deps/v8/src/objects.o] Error 4
rm 95a684f5aeaaff1b07f1400d8d6576070d6c390f.intermediate
Makefile:76: recipe for target 'node' failed
make: *** [node] Error 2

Contents of /home/ubuntu/.cache/Homebrew/Logs/node/02.make are here.

Are you able to install Linuxbrew in the directory /home/linuxbrew/.linuxbrew/?

g++-5: internal compiler error: Killed (program cc1plus)

An internal compiler error usually indicates a compiler bug, or occasionally faulty hardware.

Alrighty then... it turns out I had a very old installation that didn't let me choose to install to /home/linuxbrew/.linuxbrew, so I was stuck with ~/.linuxbrew. Uninstalled, reinstalled, and brew install node was a success!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baranyildirim picture baranyildirim  Â·  6Comments

thedrow picture thedrow  Â·  5Comments

hidvegin picture hidvegin  Â·  6Comments

lday0321 picture lday0321  Â·  7Comments

vkyt picture vkyt  Â·  4Comments