无法在 Windows 2012 上运行 Sonatype Nexus Repository Manager 3.0

jer*_*nja 3 repository nexus sonatype

我无法启动 Sonatype Nexus Repository Manager 3.0.0 Milestone 7 Release (nexus-3.0.0-b2016011501)。解压缩 Windows 存档后:

然后,nexus.exe /run

ERROR: Bundle com.sun.jna [5] Error starting mvn:net.java.dev.jna/jna/4.0.0 (org.osgi.framework.BundleException: Unable to resolve com.sun.jna [5](R 5.0): missing requirement [com.sun.jna [5](R 5.0)] osgi.native; (|(&(osgi.native.osname~=win32)(osgi.native.processor~=x86))(&
... ... ... ...
(osgi.native.processor~=ppc))))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)
Run Code Online (Sandbox Code Playgroud)

raf*_*end 5

这里打开了一个问题:

该错误消息意味着 OSGi 框架 (Apache Felix) 无法将操作系统和处理器名称与可用的 JNA 本机库之一匹配。

您应该能够通过添加以下行来解决此问题 NEXUS_HOME/etc/custom.properties

felix.native.osname.alias.windowsserver2012=windows server 2012,win32

其中“win32”是 Felix 用于任何 Windows 操作系统的通用别名(然后使用处理器名称来决定是安装 32 位还是 64 位本机库)。

归功于S. McCulloch的解决方案,加上@manfred-moser和R. Seddon从 Sonatype 的快速回答。