在Vagrant Synced文件夹内的SBT/Typesafe Activator中不允许操作

Mar*_*ark 4 sbt vagrant playframework-2.0 typesafe-activator

我正在通过Vagrant/Virtualbox配置的Ubuntu机器上的Typesafe Activator运行SBT.主机是Windows 8.

我正在尝试通过输入命令(或)来编译Play项目https://github.com/markisus/ScalaPoker,然后将repo克隆到计算机上.repo位于同步文件夹中./activatorsudo ./activatorcompile.我认为这是问题的根源.

我收到了错误 Operation not permitted:

[info] Compiling 34 Scala sources to /home/vagrant/sp2/ScalaPoker/ScalaPokerEngine/target/scala-2.11/classes...
[error] Operation not permitted
[error] one error found
[error] (ScalaPokerEngine/compile:compile) Compilation failed
[error] Total time: 91 s, completed Jan 26, 2015 4:29:22 AM  
Run Code Online (Sandbox Code Playgroud)

我不确定哪个操作完全不允许.该项目在我的主机上编译得很好.

运行 last,我明白了

[debug] Running cached compiler e13c8f, interfacing (CompilerInterface) with Scala compiler version 2.11.1
[debug] Calling Scala compiler with arguments  (CompilerInterface):
[debug]         -bootclasspath
[debug]         /usr/lib/jvm/java-6-openjdk-i386/jre/lib/resources.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/rt.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/jsse.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/jce.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/charsets.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/jfr.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/netx.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/plugin.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/rhino.jar:/usr/lib/jvm/java-6-openjdk-i386/jre/classes:/root/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.1.jar
[debug]         -classpath
[debug]         /home/vagrant/sp2/ScalaPoker/ScalaPokerEngine/target/scala-2.11/classes
[error] Operation not permitted
[error] one error found
[debug] Compilation failed (CompilerInterface)
[error] (ScalaPokerEngine/compile:compile) Compilation failed
Run Code Online (Sandbox Code Playgroud)

所以看起来我不允许运行Scala编译器?我不确定Activator放置Scala编译器的位置,现在我卡住了.

可在此处找到虚拟机的设置(Vagrantfile和salt文件)https://github.com/markisus/ActivatorVagrant/tree/scalapoker

cbl*_*ley 5

是的,当您使用同步文件夹时,安装在guest虚拟机中的文件夹会继承主机底层文件系统的限制.

首先,可能无法创建符号链接.

此类错误的另一个常见原因是Windows文件系统默认情况下不允许并发访问文件.例如,您无法删除仍由另一个进程打开的文件(这在Linux上没有问题).

在Windows上,这通常是反病毒软件的情况,该软件打开具有独占访问权限的文件以便在它们被执行或加载之前检查它们并对系统造成损害.其他进程(包括VM内部运行的进程)在尝试访问这些文件时会收到错误(如果反病毒软件仍在分析它们).

您可以尝试通过在编译阶段运行sysinternal的ProcessMonitor来进一步检查主机上的问题.查看共享文件夹中的文件出现的错误.提示:对文件路径使用启动过滤器,以便仅包含特定文件夹的事件.

在guest中,您可以在strace中运行激活器,例如:

$ strace -f -ocompile.log ./activator compile
Run Code Online (Sandbox Code Playgroud)

compile.log运行后查看文件以获取一些线索.