NFS sync folder settings macOS Sierra host, ubuntu/xenial64 - bcrypt install fails on preserve permissions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NFS sync folder settings macOS Sierra host, ubuntu/xenial64 - bcrypt install fails on preserve permissions

Brian Ross
I am looking for help on what extra configuration I can set to allow my ubuntu virtualbox vm to write into the NFS synced project directory on my OSX host. I've also set the explicit sudoers for vagrant so it shouldn't have any issues modifying the host if needed.

My Vagrantfile: 

Vagrant.configure(2) do |config|
  config
.vm.box = "ubuntu/xenial64"
  config
.vm.provider "virtualbox" do |v|
    v
.memory = "3072"
    v
.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
 
end

  config
.vm.define "dev", primary: true do |dev|
    dev
.vm.hostname = "proteus.dev"
    dev
.vm.network "private_network", ip: "192.168.10.10"
    dev
.vm.synced_folder '.', '/home/ubuntu/src/proteus', nfs: true, mount_options:['nolock,vers=3,udp,noatime,actimeo=1']
   
# also tried 'rw' and other linux__mount_options
 
end
end

I've got all the base dependencies installed in the box, but the remaining piece seems to be some permissioning across NFS that is preventing our nodejs application from installing. The 404 error is known--and an install in a *non* synced project dir works fine.

How can I get the config to allow the VM to write into the directory as if it was my host machine? I'm looking for a setup where I can edit code from within macOS but the app runs inside the VM. Not 100% sure but it looks like the "preserve permissions" on the cp are the culprit, please point me in the right direction if this is not it!

$ npm install bcrypt

> bcrypt@1.0.2 install /home/ubuntu/src/proteus/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node
-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz
node
-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.2 and node@6.11.0 (node-v48 ABI) (falling back to source compile with node-gyp)
make
: Entering directory '/home/ubuntu/src/proteus/node_modules/bcrypt/build'
  CXX
(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX
(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX
(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE
(target) Release/obj.target/bcrypt_lib.node
  COPY
Release/bcrypt_lib.node
cp: preserving permissions for Release/bcrypt_lib.node’: Operation not permitted
bcrypt_lib
.target.mk:134: recipe for target 'Release/bcrypt_lib.node' failed
make
: *** [Release/bcrypt_lib.node] Error 1
make
: Leaving directory '/home/ubuntu/src/proteus/node_modules/bcrypt/build'
gyp ERR
! build error
gyp ERR
! stack Error: `make` failed with exit code: 2
gyp ERR
! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR
! stack     at emitTwo (events.js:106:13)
gyp ERR
! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR
! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR
! System Linux 4.4.0-83-generic
gyp ERR
! command "/usr/bin/nodejs" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ubuntu/src/proteus/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/ubuntu/src/proteus/node_modules/bcrypt/lib/binding"
gyp ERR
! cwd /home/ubuntu/src/proteus/node_modules/bcrypt
gyp ERR
! node -v v6.11.0
gyp ERR
! node-gyp -v v3.6.2
gyp ERR
! not ok
node
-pre-gyp ERR! build error
node
-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/src/proteus/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ubuntu/src/proteus/node_modules/bcrypt/lib/binding' (1)
node
-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/ubuntu/src/proteus/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node
-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node
-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node
-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:891:16)
node
-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node
-pre-gyp ERR! System Linux 4.4.0-83-generic
node
-pre-gyp ERR! command "/usr/bin/nodejs" "/home/ubuntu/src/proteus/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node
-pre-gyp ERR! cwd /home/ubuntu/src/proteus/node_modules/bcrypt
node
-pre-gyp ERR! node -v v6.11.0
node
-pre-gyp ERR! node-pre-gyp -v v0.6.32
node
-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/src/proteus/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ubuntu/src/proteus/node_modules/bcrypt/lib/binding' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY
: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY
: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR
! Linux 4.4.0-83-generic
npm ERR
! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "bcrypt"
npm ERR
! node v6.11.0
npm ERR
! npm  v3.10.10
npm ERR
! code ELIFECYCLE



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/420d80c1-46fa-4ac4-90ca-575d35f6b4a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.