How to upgrade intelliJ on Linux
Answered
It's Ubuntu 1804. I downloaded the tar.gz package, and extracted to /opt/.... Now, I'm prompted to upgrade it, but access is denied. Then I tried to launch it from from command line. Well, I created a command line launcher earlier. I tried
`sudo idea`, and `sudo /opt/idea-IU-193.5662.53/bin/idea`. Both of the ways ask me to import setting and activate idea.... I usually launch it from desktop entry.
What is the correct way to upgrade it and not losing any configuration?
Please sign in to leave a comment.
> I'm prompted to upgrade it, but access is denied.
The easiest way is to solve that error. Can you provide more details regarding it? What the message returns?
You can also move config from an older version. Here you could find the config location:
https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs?page=3#comments
I don't know where the log is, but here's the screen shot
It says it needs a privileged user. That's why I used `sudo`...
What are the permissions and the owner of `/opt/idea-IU-193.5662.53` directory? From what user did you launch the IDE? Please also
attach zipped [IDE log directory](https://intellij-support.jetbrains.com/hc/en-us/articles/207241085).
You can use JetBrains FTP share:
https://intellij-support.jetbrains.com/hc/en-us/articles/206869619-Uploading-Large-Files-for-JetBrains-Support-Team
Or continue troubleshooting in the following YouTrack ticket wit the same problem:
https://youtrack.jetbrains.com/issue/IDEA-157162
As a workaround, you can just sync your settings with your JetBrains account:
https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html#
And reinstall IntelliJ IDEA.
It's `drwxr-xr-x 9 root 4096 16 10:04 idea-IU-193.5662.53`
You want me to change it to my account, not root?
Well, I thought there's another official way. I've changed the directory owner, and it can updated. However, why it tells me to import setting and activate when I was launching from command line though?
Settings are stored in the user's directory. So, once the IntelliJ IDEA is executed under root, it scans the root's folder for settings.
Another approach
By default the owner of /opt/idea-UI-xxxx is the user root and the group root. The group permissions are readonly by default.
1. Change permissions to allow the group to write / change files:
2. Change ownership to a group your user belongs to. If your idea user is in the wheel group, you can use it. (Otherwise create an usergroup and add the user.)
The commands are examples.
Then you have to add your account to the wheel group and exit your window manager and log on again. Haven't tried the last two yet, will update in a few mins
Yep. I can confirm that you need the last two steps. I tried at first before doing either, and the Update and Restart button was grayed out. The first of these should be fairly obvious, the second is needed because adding yourself to the wheel group takes effect only after logging out then in again.
To give a regular user right to modify executables sound odd to me. Luckily I found a way to execute IDE with root rights and user's configuration, so no need to perform first run "next, next, next" and enter license.
Hey, Jetbrains, why there is no idea-update.sh or something like that just for updates by root? Why don't "Please run it by a privileged user..." link run pkexec for user? And, yes, where are debs and rpms?
@... Just use JetBrains ToolBox. It will take care of installations, updates, user rights and so on.
Feature request for .deb packaging is here: https://youtrack.jetbrains.com/issue/IDEA-22750
Thank to G Aschbrenner!!!
I can confirm his approach works!