无法为linux创建javafx应用程序.deb包 [英] unable to create javafx application .deb package for linux

查看:562
本文介绍了无法为linux创建javafx应用程序.deb包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[fx:deploy] java.io.IOException: Cannot run program "fakeroot" (in directory "/tmp/fxbundler2581933641178636333/images/linux-deb.image"): error=2, No such file or directory
[fx:deploy]     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
[fx:deploy]     at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:146)
[fx:deploy]     at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
[fx:deploy]     at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)
[fx:deploy]     at com.oracle.tools.packager.linux.LinuxDebBundler.buildDeb(LinuxDebBundler.java:846)
[fx:deploy]     at com.oracle.tools.packager.linux.LinuxDebBundler.bundle(LinuxDebBundler.java:352)
[fx:deploy]     at com.oracle.tools.packager.linux.LinuxDebBundler.execute(LinuxDebBundler.java:898)
[fx:deploy]     at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:506)
[fx:deploy]     at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:471)
[fx:deploy]     at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:285)
[fx:deploy]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[fx:deploy]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[fx:deploy]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[fx:deploy]     at java.lang.reflect.Method.invoke(Method.java:497)
[fx:deploy]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[fx:deploy]     at org.apache.tools.ant.Task.perform(Task.java:348)
[fx:deploy]     at org.apache.tools.ant.Target.execute(Target.java:435)
[fx:deploy]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
[fx:deploy]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[fx:deploy]     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[fx:deploy]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[fx:deploy]     at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
[fx:deploy]     at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[fx:deploy]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:452)
[fx:deploy]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:139)
[fx:deploy] Caused by: java.io.IOException: error=2, No such file or directory
[fx:deploy]     at java.lang.UNIXProcess.forkAndExec(Native Method)
[fx:deploy]     at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
[fx:deploy]     at java.lang.ProcessImpl.start(ProcessImpl.java:134)
[fx:deploy]     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[fx:deploy]     ... 24 more

BUILD FAILED
/home/india/Desktop/ReadEdge/build/build.xml:208: Error: Bundler "DEB Installer" (deb) failed to produce a bundle.

Total time: 54 seconds


推荐答案

错误消息在其没有这样的文件或目录的说法中有点误导,因此,乍一看,听起来好像 tmp 中缺少某些内容目录。

The error message is a bit misleading in its talk of "no such file or directory" so that, at first sight, it sounds as though there's something missing from the tmp directory.

实际抱怨的是, fakeroot 未安装在您的系统。假设你正在建立一个类似ubuntu的系统,这应该让你解决:

What it's actually complaining about is the fact that fakeroot is not installed on your system. Assuming you're building on an ubuntu-like system, this should sort you out:

sudo apt-get install fakeroot

fakeroot 对我而言是新的。 此链接说明了您需要它的原因

fakeroot was a new one on me. This link explains why you need it.

这篇关于无法为linux创建javafx应用程序.deb包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆