如何在Oracle VM VritualBox中运行Debian GNU / Linux 9(stretch)64位​​的IONIC框架?

我想安装IONIC,但是我不喜欢Windows,因为早些时候会遇到一些不兼容的开发工具或服务的问题。

具有讽刺意味的是我在Debian上安装IONIC时也遇到了问题,但是我认为这是我在VirtualBox里面运行Debian的原因……而且我试图在Windows中的共享文件夹上安装IOINC。

Node,npm&IONIC已安装并正在运行。 当我尝试在与Windows共享的文件夹中创buildIONIC应用程序“ionic start myApp tabs”时出现问题。

我想要安装我的IONIC应用程序的文件夹是安装在Debian上的共享文件夹,并在Windows中创build。 事实上,我可以在系统的其他文件夹中创buildIONIC应用程序,唯一显示这些错误的是共享文件夹。

我认为这不是一个权限问题。 我已经尝试所有安装步骤作为根,并出现相同的错误。 此外,IONIC可以在共享文件夹中写入,因为里面有很多文件,但由于某种原因,IONIC应用程序的创build永远不会结束。

我想这些日志的最后一行可能会给人一些线索发生什么,并帮助我解决这个问题。

67177 verbose cwd /media/sf_IONIC-Shared/myApp3 67178 error Linux 4.9.0-3-amd64 67179 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" 67180 error node v6.11.1 67181 error npm v3.10.10 67182 error path ../acorn/bin/acorn 67183 error code EROFS 67184 error errno -30 67185 error syscall symlink 67186 error rofs EROFS: read-only file system, symlink '../acorn/bin/acorn' -> '/media/sf_IONIC-Shared/myApp3/node_modules/.bin/acorn' 67187 error rofs This is most likely not a problem with npm itself 67187 error rofs and is related to the file system being read-only. 67187 error rofs 67187 error rofs Often virtualized file systems, or other file systems 67187 error rofs that don't support symlinks, give this error. 67188 verbose exit [ -30, true ] 

请帮忙。 谢谢。

PD:您可以在下面的链接中阅读整个日志

https://drive.google.com/open?id=0ByMd2Tsklj1pVnM3Ymx1ajhVV0k

发生此错误的原因是IONIC使用NPM,使用VirtualBox文件系统不喜欢的符号链接(出于安全原因,我不明白)。

幸运的是有一个修复…你可以在这里阅读原始答案: https : //github.com/npm/npm/issues/992#issuecomment-289935776

无论如何,该解决scheme都被复制。

在主机上(假设是Windows),但是这个操作系统的一些变化可以在任何操作系统上运行:cd C:\ Program Files \ Oracle \ VirtualBox

  1. 运行以下命令:VBoxManage setextradata VM_NAME VBoxInternal2 / SharedFoldersEnableSymlinksCreate / SHARE_NAME 1用您的虚拟机的名称replaceVM_NAME(如果您不知道这一点,请在VBox中进入机器>设置>常规>基本>名称—将SHARE_NAMEreplace为您的共享文件夹的名称,如果您不记得这一点,请转到计算机>设置>共享文件夹。

  2. 重新启动您的虚拟机和VirtualBox,但以pipe理员身份运行。 在Windows主机上,右键单击VirtualBox图标,然后select以pipe理员身份运行。

PD:在VirtualBox中使用NPM,不仅是IONIC,还有一个挂载的共享文件夹。