Gem install Fail on Shared VirtualBox Folder - bundle

There's a Windows Host and an Ubuntu guest using VirtualBox.
We can gem install just fine for individual gems on Ubuntu. When running
bundle install --path vendor
for an app that is on a shared folder in Ubuntu it fails with.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
/var/www/chef-playground/vendor/ruby/2.1.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:226: warning: Insecure world writable dir /opt/chef/embedded/bin in PATH, mode 040777
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-linux-gnu/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1/ports/x86_64-linux-gnu/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-linux-gnu/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1/ports/x86_64-linux-gnu/libxslt/1.1.26)...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
Text file busy # unlink_internal - ./siteconf20140313-27134-167s4eq.rb
Gem files will remain installed in /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1 for inspection.
Results logged to /var/www/chef-playground/vendor/ruby/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.1/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling

The last line of your stack trace has the explanation.
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling
I ran into the same error while using it on Fedora 20. There is a good explanation of how to overcome it at the nokogiri site.
I ran the following 2 commands and then the bundle install worked:
sudo yum install -y rubygem-nokogiri
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel

It might be because of this:
Text file busy # unlink_internal - ./siteconf20140313-27134-167s4eq.rb
This is apparently an existing problem with regards to sharedfolders, Virtualbox and Windows hosts. It seems they have been blaming Window's aggressive file handling.
Ansible text file busy error
You can try a workaround by installing the gems somewhere on guest machine instead of inside your sharedfolder i.e. install your gems in your home directory: bundle install --path ~/vendor. You might have to reconfigure your .bundle/config to make sure you're pointing at the correct directory.


Error installing Nodejs on CentOS 5 server - no module bz2

I'm trying to get NodeJS installed on my CentOS 5 server
I got Python 2.6 installed, and I got ./configure to work, but when I run the make command I get this result
[root#catch24dev node-v0.8.6]# make
make -C out BUILDTYPE=Release V=1
Traceback (most recent call last):
File "../../tools/", line 36, in <module>
import bz2
ImportError: No module named bz2
make[1]: *** [/usr/local/src/node-v0.8.6/out/Release/obj/gen/] Error 1
make[1]: Leaving directory `/usr/local/src/node-v0.8.6/out'
make: *** [node] Error 2
[root#catch24dev node-v0.8.6]# which bzip2
I, too, got the same error as Marius Milliunas when I ran make on Centos 6.4 - That was after I ran the ./configure command in the nodejs directory, which I had extracted from the downloaded nodejs tarball. Just as Marius Milliunas did.
The root of the problem is that the nodejs installation relies on Python being installed. Specifically, the default Python installation for Centos 6.4 does NOT include the bz2 module and corrective action, of course, starts with installing the bz2 module. This is done by running
yum install bzip2-devel
I also ran for good measure
yum install bzip2
The built-in Python for Centos 6.4 is Python 2.6.6 but that's fine for the purpose of installing the latest version of nodejs, which as of this writing is node v0.10.26
Once you have run yum install bzip2-devel , you can go back and run make in the nodejs directory and this time, make will run to completion. Follow up by running make install as per the instructions set in the nodejs directory.
You can test your nodejs installation by running node and getting the prompt. I chose to test by creatind a nodejs-based web server, as described in
I knew all was cool with the world and that I had properly installed nodejs on Centos 6.4 when I followed this instruction
The server is running, so you should be able to open and see:
It works!
and got the "It works" output, as expected :)
Important Note
If you are additionally installing Python 2.7.6 and Python 3.3.4 on the Centos 6.4 machine, follow the instructions on this link:
Installing Python 2.7.6 and Python 3.3is purely optional. Note that the last step of installing Python 2.7.6 and Python 3.3.4 is
make altinstall
and NOT "make install" I ran "make install" by mistake and destroyed my access to system Python, which is Python 2.6.6, and my access to yum. In fact, I surmise that I destroyed my access to every program on Centos 6.4 that relies on access to system Python to work properly. If I had successfully installed nodejs by that point in time, I would have destroyed my access to nodejs, too. I had to destroy and recreate /usr/local/bin/python2 as the soft link to /usr/local/bin/python2.6 and do the same with /usr/bin/python2 to get things back to normal. Not much fun.
Note that another solution to this issue (unable to compile node.js) is to use the binary distributions for Linux which have been published since 0.8.6
Here's the script I used:
# get the latest stable binary
# (modify version number based on what you find in that folder)
cd /usr/local/
sudo tar xzvf ~/node-v0.8.20-linux-x64.tar.gz --strip=1

Installation of travis fails on ubuntu 16.04

I'm trying to install travis on ubuntu but keeps failing. How can I solve this?
sudo gem install travis
Building native extensions. This could take a while... ERROR: Error
installing travis:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.1.0/gems/ffi-1.9.21/ext/ffi_c /usr/bin/ruby2.1 -r ./siteconf20180216-3916-17dbwfe.rb extconf.rb
checking for ffi.h... no checking for ffi.h in
/usr/local/include,/usr/include/ffi... no checking for shlwapi.h... no
checking for rb_thread_blocking_region()... yes checking for
rb_thread_call_with_gvl()... yes checking for
rb_thread_call_without_gvl()... yes creating extconf.h creating
current directory: /var/lib/gems/2.1.0/gems/ffi-1.9.21/ext/ffi_c make
"DESTDIR=" clean
current directory: /var/lib/gems/2.1.0/gems/ffi-1.9.21/ext/ffi_c make
"DESTDIR=" Running autoreconf for libffi
/var/lib/gems/2.1.0/gems/ffi-1.9.21/ext/ffi_c/libffi/ 2:
exec: autoreconf: not found recipe for target
'"/var/lib/gems/2.1.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux-gnu"/.libs/libffi_convenience.a' failed make: ***
["/var/lib/gems/2.1.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux-gnu"/.libs/libffi_convenience.a] Error 127
make failed, exit code 2
Gem files will remain installed in /var/lib/gems/2.1.0/gems/ffi-1.9.21
for inspection. Results logged to
Solved by running the following command.
sudo apt install libffi-dev

cordova is installed but not starting up

I installed node.js 8.9.3 and a successfully installed with following message
This package has installed:
• Node.js v8.9.3 to /usr/local/bin/node
• npm v5.5.1 to /usr/local/bin/npm
Make sure that /usr/local/bin is in your $PATH.
I run following command in terminal mac ...
And i get following return..
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin: No such file or directory
Q1. What does that last line mean? No such file or directory?
.. after that i run following commands..
$ which node
And following is response
and similar for
$ which npm
And following is response
I think everything is fine till now..
Now i installed ...cordova typing..
$ sudo npm install -g cordova
It is installed and the next lines after completing installation i see ..
/Volumes/macHDD/Users/samz/.npm-packages/bin/cordova -> /Volumes/macHDD/Users/samz/.npm-packages/lib/node_modules/cordova/bin/cordova
+ cordova#8.0.0
updated 1 package in 27.977s
Q2. is it successfully installed? if so.. why is this not as global?
when i test typing
$ which cordova
terminal says nothing.. I also tested typing
$ cordova -version or $ cordova --version .. or even if i type
$ cordova create hello com.example.hello HelloWorld
I am "slapped" by terminal :(
-bash: cordova: command not found
in the last night. i was successful in installing cordova, and I created 2 test apps.. i was able edit them, even I run those apps on android emulator and on my ios device+emulator.
during building/preparing one of my app, I tried to create one more app project through a seperate terminal instance. And there I saw .. like no cordova.
I terminated first instance where cordova was working.. and reopened terminal to test if this is an issue.. and yes.. it was .. I could never work on cordova again.
Can somebody tell me what is the issue. ?.
it's very irritating now.
Thank you
I don't know how this is resolved..
I reinstalled node, npm, java, cordova (several times), but nothing could resolve.
and today .. i upgraded node9.3.0 from node8.9.3.. but still the same errors.
Now i had..
Muhammads-MacBook-Pro:colors muhammadfarooqi$ node --version
Muhammads-MacBook-Pro:colors muhammadfarooqi$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Muhammads-MacBook-Pro:colors muhammadfarooqi$ npm -version
Muhammads-MacBook-Pro:colors muhammadfarooqi$ cordova -version
i was about to kill myself.. but i found something on the internet with some other issue.. and i run the same command.
sudo rm -rf node_modules
sudo npm install
and then i installed cordova.
and wow... cordova is there :)
i dont' know what exactly was the solution .. I dont' know what this line of code did.. I know the above line removed node_modules and 2nd lines installed npm.. and now I am seeing cordova is running.
Please somebody, if my solution works for anybody, kindly comment. thank you
Your first issue is because you typed just $PATH. This is then expanded to its value, and then the shell attempts to execute it, which is obviously not possible.
To check your current PATH, type echo $PATH instead.
Your second issue is probably due to a partial configuration to use a user-specific global package directory.
By default, packages are installed in /usr/local/lib/node_modules, with symlinks for binaries in /usr/local/bin, which requires root access (sudo). You have at one point configured npm to install in a different directory (~/.npm-packages), but did not include the bin sub-directory in your PATH.
So you need to either finalise the configuration (see for details), or revert to using /usr/local.

env: node: No such file or directory in phpstorm when compiling less

I'm trying to compile my main.less file to a main.css file using phpstorm. However, I'm getting this error and the .less file does not compile.
/usr/local/bin/lessc main.less
env: node: No such file or directory
Process finished with exit code 127
I'm using a mac and not sure why this is happening. It was working fine before, but I restarted my computer and now I'm getting this error.
Does anyone know why this is happening and how to fix?
Seems Node is not found in your PATH. PHPStorm normally uses your environment variables to figure out tools locations. But on MacOSX the environment variables differ between GUI applications and within the terminal. PHPStorm tries to load terminal environment on startup by executing the following command on startup:
-l -i -c '/Applications/'
Seems this command either fails or can't retrieve all needed stuff.
Can you check if the problem persists when running PHPStorm from system terminal (open -a /Applications/
And one more thing to check: please open your Less file watcher settings, press ellipsis button in 'Environment variables' field to view variables - do you have 'Include parent environment variables' enabled? If this option is disabled, system environment variables won't be available to file watcher
This was happening to me because I had node installed via nvm, and nvm installed via homebrew, which is not officially supported. I deleted nvm completely and reinstalled it using the official install script, reinstalled node via nvm, and the error went away.
See nvm is not compatible with the npm config “prefix” option for more information.
Had this problem with uglify-js but it's the same thing. Turned out to be caused by using nvm, which nests the node root.
Fixed it by following #funivan comment to create a symlink pointing to my (default) node version under nvm.
sudo ln -s /home/[usr]/.nvm/versions/node/[v8.9.1]/bin/node /usr/bin/node

cordova build Command failed with exit code EACCES

Cordova build failed with error code : EACCESS
$ cordova build android
Running command: /home/user/proj1/platforms/android/cordova/build
execvp(): Permission denied
Error: /home/user/proj1/platforms/android/cordova/build: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:795:12)
OS : Ubuntu 14.04
npm version: 1.4.16
cordova version : 3.5.0-0.2.4
have added android platform to proj1
tried to re-installing cordova but did not work
For some reason build is not currently an executable file. To fix that, open the terminal and enter the following commands:
$ cd <your-project-directory>/platforms/android/cordova
$ chmod a+x build
This is a common PhoneGap problem.
Most of the time it has to do with permissions on the build folder and script file.
Try using: chmod a+x on them.
To solve the EACCESS Problem please copy and save your platform custom icons / splashes / config.xml settings and delete the platform folder. after that run phonegap run android from your console again. it should work again. after that copy back the custom files / settings to the new platform folder.
My problem was solved by removing the map /platforms/android. After that I added the platform again.
cordova platform add android
For me it worked out, but I think there are multiple reasons this error is shown..
! Backup your icons !
Remember to backup your icons in /platforms/android/res/
Or copy the whole map as backup to be sure you don't lose your work...
You could brute force it if you are an admin and just sudo chmod -R 777 ./platforms/ from the project root directory.
My advice is to remove the platforms directory, and reinstall each platform.
$ cd <your-project-directory>
$ rm -r platforms # -or- manually remove the directory
$ cordova platform add <platform> # ios, android, ...
Running chmod a+x build (as suggested in the accepted answer) doesn't fix cordova platform rm <platform> permission issues. Safer (and easier) to restore each platform to it's default state, instead of hacking (and remembering) permission changes for individual files / directories.
Hard to diagnose the problem here. Could you add more information to the problem description?
For what I can see, which is not too much, it is because one of the executables doesn't have the right exec permissions for your user (assuming you are on Ubuntu 14.04 per your output).
Ensure Android SDK Tools and Platform-Tools, as well as Oracle JDK and Ant, are in your PATH with the appropriate permissions. Otherwise, put more information here.
I have same problems, solved it today after countless of trials and error. I have actually get BUILD SUCCESS to appear.
the thing is to change the environemnt variable..
JAVA_HOME : c:\Program Files(x86)\Java\jre
PATH: c:\Program Files(x86)\Java\jdk1.x.x\bin
JAVA_HOME : c:\Program Files(x86)\Java\jdk1.x.x\jre
PATH: c:\Program Files(x86)\Java\jdk1.x.x\bin
NOTE: the JAVA_HOME has to point to JDK/JRE (the jre child of jdk). I install both jre and jdk. it seems that I need to install both for the cordova-CLI to work on windows8.1.
I hope this helps.