[SOLVED] Cannot Deploy anymore on Vanilla Ubuntu 14.04 - Problem with installing fibers (Meteor 1.3.4)


#1

I recently wanted to move a project on a new server; I therefor used my Installation Script I have written when Ubuntu 14.04 came out and since then everything worked super.

On a fresh install of Ubuntu 14.04 on a Strato VPS Server I have done:

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install  \
build-essential git gcc python python-dev python-pip \
openssl binutils zip curl g++ \
build-essential libssl-dev git-core pkg-config

Now install Node with the Node Version Manager:

NODEVERSION=$(.meteor/packages/meteor-tool/1.1.4/mt-os.linux.x86_64/dev_bundle/bin/node --version)

git clone git://github.com/creationix/nvm.git ~/nvm
source ~/nvm/nvm.sh

nvm install $NODEVERSION #replace with meteor node version
nvm use $NODEVERSION #replace with meteor node version

# to install node globally and make it available to all users
n=$(which node);n=${n%/bin/node}; 
chmod -R 755 $n/bin/*; 
sudo cp -r $n/{bin,lib,share} /usr/local

#install some dependencies:
sudo npm install -g forever

Install Meteor in Home Folder of actual user like on meteor webside curl ... | sh

That is the Setup I do at all meteor servers. And usually I do not have any problems after that.

My Building Process is like

meteor build --directory /opt/webapps/"$APPNAME"
cd /opt/webapps/"$APPNAME"/

mv bundle $URL

(cd program/server && npm install fibers && npm install)

but that does not work. I cannot get Fibers installed anymore. I get:

> fibers@1.0.13 install /opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers
> node build.js || nodejs build.js

make: Entering directory `/opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
g++: internal compiler error: Bus error (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 4
make: Leaving directory `/opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-042stab111.12
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers
gyp ERR! node -v v0.10.45
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++`
Alpine users please run: `sudo apk add python make g++`
make: Entering directory `/opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
g++: internal compiler error: Bus error (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 4
make: Leaving directory `/opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-042stab111.12
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/node_modules/fibers
gyp ERR! node -v v0.10.45
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++`
Alpine users please run: `sudo apk add python make g++`
npm ERR! Linux 3.13.0-042stab111.12
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.45
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! fibers@1.0.13 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the fibers@1.0.13 install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js || nodejs build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs fibers
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls fibers
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/webapps/rmt-prod/www.rhein-main-taenzer.de/programs/server/npm-debug.log

also installing fibers globally does not work and gives a very likely error sudp npm install -g fibers


#2

check that your npm version is same of meteor npm version:
meteor npm -v and npm -v.
i’ve got the same problem, so if the npm node version is different of meteor npm version, do
sudo npm cache clean -f sudo npm install -g npm@X.X.X
and try again. X.X.X represents meteor npm version.


#3

I figured out that I had a wrong stdlibc++ library.

# For stdlibc++ with GLIBC version 3.21
# (included in ubuntu 16.04 but not in 14.04)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
sudo apt-get update
sudo apt-get upgrade