Eclipse 更新失败并显示消息“访问权限不足,无法应用此更新”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22963884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Update Failing with Message "Insufficient access privileges to apply this update"
提问by Joe DeRose
I'm running Eclipse under a Windows 7, 64-bit installation on which I have administrator privileges.
我在具有管理员权限的 Windows 7 64 位安装下运行 Eclipse。
Since I first installed Eclipse many months ago, I've been able to keep it up to date with the Help > Check for Updatesfunction—but starting a couple of weeks ago, it gave the message
自从我几个月前第一次安装 Eclipse 以来,我已经能够通过“帮助”>“检查更新”功能使其保持最新状态——但是从几周前开始,它给出了消息
Insufficient access privileges to apply this update.
没有足够的访问权限来应用此更新。
Even when I ran Eclipse as an administrator, I continued to get this message. How can I fix it?
即使当我以管理员身份运行 Eclipse 时,我仍然收到此消息。我该如何解决?
采纳答案by tbeernot
Another (simpler?) approach which worked for me is to simply give the group "Users" write permission on C:\Program Files (x86)\eclipse.
另一种(更简单?)对我有用的方法是简单地授予“用户”组对C:\Program Files (x86)\eclipse 的写权限。
Now, this is a security consideration, but you're NOT granting access to the whole of C:\Program Files (x86), just the eclipse installation.
现在,这是出于安全考虑,但您并未授予对整个C:\Program Files (x86) 的访问权限,而只是授予eclipse 安装的访问权限。
回答by Chris Clark
For anyone using Linux: I had this problem in Ubuntu because I had installed Eclipse in /opt, which was owned by root.
对于使用 Linux 的任何人:我在 Ubuntu 中遇到了这个问题,因为我在 /opt 中安装了 Eclipse,它由 root 拥有。
To get the updates, simply run Eclipse as root and then select the Help -> Check for Updatesagain. In general running applications as root is not a good idea, but if it's just to do an update... well that's what the root account is for :)
要获取更新,只需以 root 身份运行 Eclipse,然后再次选择Help -> Check for Updates。一般来说,以 root 身份运行应用程序不是一个好主意,但如果只是为了进行更新......那就是 root 帐户的用途:)
cd /opt/eclipse
sudo ./eclipse
回答by Andy King
In Windows another option is to set the "Run as administrator" property on the Eclipse shortcut that you're using to start Eclipse. Right click on the shortcut and choose "Properties" from the dropdown menu. Click on the "Shortcut" tab in the Properties dialog and then click on the "Advanced..." button. In the Advanced Properties dialog set the "Run as administrator" option.
在 Windows 中,另一个选项是在用于启动 Eclipse 的 Eclipse 快捷方式上设置“以管理员身份运行”属性。右键单击快捷方式并从下拉菜单中选择“属性”。单击“属性”对话框中的“快捷方式”选项卡,然后单击“高级...”按钮。在高级属性对话框中设置“以管理员身份运行”选项。
回答by chrisinmtown
Hit same problem on Macos sierra 10.12.3 after clean install of Eclipse JEE Neon R. A clue was that my mac showed a dialog when I launched the app that asked:
全新安装 Eclipse JEE Neon R 后,在 Macos sierra 10.12.3 上遇到了同样的问题。一个线索是,当我启动应用程序时,我的 Mac 显示了一个对话框,询问:
“Eclipse.app” is an application downloaded from the Internet. Are you sure you want to open it?
When the updater dialog box showed "Insufficient access privileges to apply this update" I checked the Eclipse.app directory (I had downloaded & unpacked the .tar.gz file, if that matters) and saw this:
当更新程序对话框显示“没有足够的访问权限来应用此更新”时,我检查了 Eclipse.app 目录(我已经下载并解压了 .tar.gz 文件,如果这很重要)并看到:
drwxrwxr-x@ 3 chris staff 102 Jun 13 2016 Eclipse.app
I examined the extended attribute and saw this:
我检查了扩展属性并看到了这一点:
$ xattr Eclipse.app
com.apple.quarantine
That quarantine attribute seems to block the Eclipse updater! I removed that extended attribute like this:
该隔离属性似乎阻止了 Eclipse 更新程序!我删除了这样的扩展属性:
xattr -d -r Eclipse.app
After that Eclipse updated itself very happily. HTH
之后 Eclipse 非常愉快地自我更新。HTH
回答by Martin
I found a workaround for this stupid bug in Eclipse. Selecting updates one-by-one is disabled, but if you click Select all and then deselect the ones you do not need, you can proceed.
我在 Eclipse 中找到了解决这个愚蠢错误的方法。逐一选择更新已禁用,但如果您单击全选,然后取消选择不需要的更新,则可以继续。
回答by Zip184
I fixed this problem (windows) by re-opening eclipse by right-clicking the eclipse.exe and selecting "Run as administrator".
我通过右键单击 eclipse.exe 并选择“以管理员身份运行”重新打开 eclipse 来解决此问题(Windows)。
Not sure why this step was needed all of the sudden but it worked. After my upgrade (I upgraded from eclipse sdk 4.3 -> 4.4) it still lets me make updates without running as administrator.
不知道为什么突然需要这一步,但它奏效了。升级后(我从 eclipse sdk 4.3 -> 4.4 升级)它仍然让我无需以管理员身份运行即可进行更新。
回答by Joe DeRose
Solving the problem was a multi-step process for me:
解决问题对我来说是一个多步骤的过程:
- In a thread on another forum I found the advice that Eclipse should not be installed in C:\Program Files (x86). I had indeed installed (unzipped) it into that folder, so I moved it as advised to C:\Users\....
- When I loaded Eclipse in its new location, I got a different message when I attempted to scan for updates: "There are no update sites to search".
- I temporarily re-established my installation in C:\Program Files (x86), loaded it, and used Window > Preferences > Install/Update > Available Software Sites > [select all] > Export...to create an
.xml
file with my software sites. - Back in the C:\Users\...installation, I used the the same menu command (except Importinstead of Export) to pull in the contents of that
.xml
file.
- 在另一个论坛的一个帖子中,我发现 Eclipse 不应安装在C:\Program Files (x86) 中的建议。我确实已将其安装(解压缩)到该文件夹中,因此我按照建议将其移动到C:\Users\...。
- 当我在新位置加载 Eclipse 时,当我尝试扫描更新时收到一条不同的消息:“没有要搜索的更新站点”。
- 我暂时在C:\Program Files (x86) 中重新建立了我的安装,加载它,并使用Window > Preferences > Install/Update > Available Software Sites > [select all] > Export...
.xml
用我的软件创建一个文件网站。 - 回到C:\Users\...安装,我使用相同的菜单命令(除了Import而不是Export)来拉入该
.xml
文件的内容。
Now Help > Check for Updatesis again functioning as it used to.
现在“帮助”>“检查更新”再次像以前一样运行。
回答by JesseBoyd
For Linux Distros, most personal apps for all users are installed in the /opt/folder. This folder is owned by root. My solution which has been tested to work is simply to open the opt folder in terminal call 'ls' to make sure you see the 'eclipse' folder in your current directory. It may be inside another folder.
对于 Linux 发行版,所有用户的大多数个人应用程序都安装在/opt/文件夹中。此文件夹归root 所有。我的解决方案已经过测试工作,只是在终端调用“ls”中打开 opt 文件夹,以确保您在当前目录中看到“eclipse”文件夹。它可能在另一个文件夹中。
Then simply use this command replacing 'user' with your username.
然后只需使用此命令将“用户”替换为您的用户名。
sudo chown -R user:user eclipse/
and that's it. Of course only you will be able to run updates on eclipse but I imagine you are the primary user of the computer.
就是这样。当然,只有您才能在 eclipse 上运行更新,但我想您是计算机的主要用户。
回答by Robert Brooker
From Powershell, I set permissions on the folder like so:
在 Powershell 中,我对文件夹设置了权限,如下所示:
& icacls "C:\ProgramData\chocolatey\lib\eclipse-java-neon\eclipse" "/grant" "domain\user:(OI)(CI)F" "/T"
Note: I had a different install location, as I used chocolatey to install eclipse
注意:我有一个不同的安装位置,因为我使用 Chocolatey 来安装 eclipse