我想在Virtual Box 5.0.2中設置一個CentOS 7作爲我的開發框。我使用guest虛擬機共享主機上的項目文件夾(即運行Windows 7)(然後我可以使用Windows GUI並使用IDE在Windows上進行交互,而我的代碼則在CentOS上運行)。如何創建虛擬框5.0.2中的符號鏈接,CentOS 7作爲來賓,Windows 7作爲主機
我正在做一些節點的開發。
49132 error Linux 3.10.0-327.13.1.el7.x86_64
49133 error argv "/home/wdd/nvm/versions/node/v5.10.0/bin/node" "/home/wdd/nvm/versions/node/v5.10.0/bin/npm" "install"
49134 error node v5.10.0
49135 error npm v3.8.3
49136 error path /home/wdd/share/mynps-corporate-client/node_modules/.staging/iconv-lite-94545a9f
49137 error code EPERM
49138 error errno -1
49139 error syscall rename
49140 error Error: EPERM: operation not permitted, rename '/home/wdd/share/mynps-corporate-client/node_modules/.staging/iconv-lite-94545a9f' -> '/home/wdd/share/mynps-corporate-client/node_modules/iconv-lite'
49140 error at destStatted (/home/wdd/nvm/versions/node/v5.10.0/lib/node_modules/npm/lib/install/action/finalize.js:25:7)
49140 error at FSReqWrap.oncomplete (fs.js:82:15)
49140 error
49140 error Error: EPERM: operation not permitted, rename '/home/wdd/share/mynps-corporate-client/node_modules/.staging/iconv-lite-94545a9f' -> '/home/wdd/share/mynps-corporate-client/node_modules/iconv-lite'
49140 error at Error (native)
49140 error { [Error: EPERM: operation not permitted, rename '/home/wdd/share/mynps-corporate-client/node_modules/.staging/iconv-lite-94545a9f' -> '/home/wdd/share/mynps-corporate-client/node_modules/iconv-lite'] parent: 'mynps-corporate' }
49141 error Please try running this command again as root/Administrator.
49142 verbose exit [ -1, true ]
當我在網上搜索,我結識的問題是與符號鏈接:在建立我的項目,做npm install
,我爲得到一個錯誤。符號鏈接默認共享文件夾上禁用的,所以下面也失敗:
ln: failed to create hard link ‘ln-server.js’ => ‘server.js’: Operation not permitted
我曾嘗試:
sudo
對客人- 「以管理員身份運行」在主機上的虛擬框。
VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1
- 更新的用戶安全策略,並允許創建符號鏈接到「人人」
- 允許的所有權限,每個人都在主機中的項目文件夾屬性的安全設置。
我已經使用了以下鏈接:
- Correct way to setup Virtualbox 4.3 to use symlinks on guest (for meteor)
- Symlinks in shared folder of virtual box with Windows 10 host
- https://www.virtualbox.org/ticket/10085
- https://askubuntu.com/questions/446317/how-to-make-guest-os-follow-symlinks-from-shared-folder
- https://superuser.com/questions/659270/accessing-symbolic-links-in-virtualbox
更新(2016-04-21):現在我已經做了一個工作。我在不共享的目錄中執行npm install
,然後將node_modules目錄移至共享目錄,這沒有任何問題。因爲我們不經常安裝模塊,所以很好。但是,如果能指出一個真正的解決方案,這將是一件好事。