0

我有最新版本的 Netbeans 9 并从名为netbeans. 我认为这是一个安装程序脚本,并在第一次使用 root 权限运行它,但它不是安装程序脚本,而是实际程序。

从那时起,它似乎需要root 权限才能运行,在没有运行时以此错误消息终止sudo

>Log Session: Wednesday, August 1, 2018 at 8:57:52 AM Eastern Daylight Time
>System Info:    Product Version         = Apache NetBeans IDE 9.0 (Build incubator-netbeans-release-334-on-20180708)   Operating System 
= Linux version 4.15.0-29-generic running on amd64   Java; VM; Vendor        = 10.0.2; Java HotSpot(TM) 64-Bit Server VM 10.0.2+13; Oracle Corporation   Runtime                 = Java(TM) SE Runtime Environment 10.0.2+13   Java Home               = /usr/lib/jvm/java-10-oracle   System Locale; Encoding = en_GB (nb); UTF-8   Home Directory          = /home/sarah   Current Directory     
= /home/sarah/Custom Programs/NetBeans 9/bin   User Directory          = /home/sarah/.netbeans/9.0   Cache Directory         = /home/sarah/.cache/netbeans/9.0   Installation            = /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/nb
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/ide
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/extide
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/java
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/apisupport
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/websvccommon
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/profiler
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/harness
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/javafx
                            /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform   Boot & Ext. Classpath   =    Application Classpath   = /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/lib/boot.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/lib/org-openide-modules.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/lib/org-openide-util.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/lib/org-openide-util-lookup.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/lib/org-openide-util-ui.jar   Startup Classpath       = /home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/core/asm-all-5.0.1.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/core/core-base.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/core/core.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/core/org-netbeans-libs-asm.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/core/org-openide-filesystems-compat8.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/platform/core/org-openide-filesystems.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/nb/core/org-netbeans-upgrader.jar:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/nb/core/locale/core_nb.jar                     
-------------------------------------------------------------------------------                                                                                                           INFO [org.netbeans.modules.netbinox]: Install area set to file:/home/sarah/Desktop/Home/Custom Programs/NetBeans 9/              !SESSION 2018-08-01 08:57:53.947
-----------------------------------------------                                                                                                          eclipse.buildId=unknown                                                java.version=10.0.2                                                    java.vendor=Oracle Corporation                                         BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB         

                                                                                                                                                                                          !ENTRY org.eclipse.osgi 4 0 2018-08-01 08:57:53.956                    !MESSAGE Error reading configuration: Permission denied                !STACK 0                                                               java.io.IOException: Permission denied                                

        at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.base/java.io.File.createTempFile(File.java:2090)
        at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:188)
        at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:226)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:160)
        at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
        at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
        at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:67)
        at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
        at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
        at org.netbeans.modules.netbinox.Netbinox.init(Netbinox.java:61)
        at org.netbeans.core.netigso.Netigso.prepare(Netigso.java:145)
        at org.netbeans.NetigsoHandle.turnOn(NetigsoHandle.java:115)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:1331)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:1148)
        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:315)
        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:251)
        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:156)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:125)
        at org.netbeans.core.startup.Main.start(Main.java:282)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
        at java.base/java.lang.Thread.run(Thread.java:844) java.lang.RuntimeException: Permission denied
        at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:194)
        at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:67)
        at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
        at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
        at org.netbeans.modules.netbinox.Netbinox.init(Netbinox.java:61)
        at org.netbeans.core.netigso.Netigso.prepare(Netigso.java:145)
        at org.netbeans.NetigsoHandle.turnOn(NetigsoHandle.java:115)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:1331)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:1148)
        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:315)
        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:251)
        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:156)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:125)
        at org.netbeans.core.startup.Main.start(Main.java:282)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
        at java.base/java.lang.Thread.run(Thread.java:844) Caused by: java.io.IOException: Permission denied
        at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.base/java.io.File.createTempFile(File.java:2090)
        at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:188)
        at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:226)
        at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:160)
        at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
        at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
        ... 16 more

如何清除/重新安装 IDE 或删除此对 root 权限的要求?(系统信息在日志顶部)

4

2 回答 2

0

尝试更改文件所有权。执行以下命令

打开终端并将目录更改为/home/sarah/Custom Programs/NetBeans 9/bin

sudo chmod +x netbeans.sh       #### hit enter and type the root password 

现在您有权运行netbeans.sh脚本文件并在系统中安装 Netbeans。要启动安装程序向导,请在同一目录中使用以下命令。

./netbeans    #### hit enter

上面的命令启动安装向导,Netbeans 将准备好安装。

于 2018-08-02T04:49:06.720 回答
0

Delete the ~/.cache/netbeans and ~/.netbeans directories. Most likely, when you ran NetBeans as root it created root-owned cache files that your non-root user can't execute. Then start NetBeans as non-root user. This should recreate the cache files while preserving your settings.

于 2020-01-26T01:45:05.973 回答