I just installed Qt. I tried to run some demos but I cannot run any, this is the message:
Cannot create file /opt/QtSDK/Demos/4.7/chip/chip.pro.user: Permission
denied
To avoid this in the future, how can I set permissions to any program I install?
I'm new to using linux, I'm using Ubuntu 12.04.
Either don't install the SDK in a root-access directory, or run the program (qtcreator, etc...)with root privileges. I would choose the former solution. I generally use a folder in my home directory.
Qt SDK is standalone, so you can copy or move the whole folder to a new location which doesn't requires root privileges.
Related
I'm configuring software on my first web server, so I am not totally familiar with how everything works, but here is the basic problem:
I have purchased hosting on a web server that runs on CentOS. I have been able to install postgreSQL via an install process that the hoster provides, so that my database will be local only to my home folder. That is working fine.
However, I am trying to install a postgreSQL extension called PostGIS. I have tried to compile it from source on my web server, but it now requires an additional library called GEOS. I downloaded the library from http://download/osgeo.org/geos/geos-3.6.2.tar.bz2, extracted it, and used make install to run it.
Now the problem is that it fails due to this error:
/bin/mkdir: cannot create directory /usr/local/include/geos: Permission Denied
It's not really a surprise, because it is trying to make a new directory in the system root folders, rather than within my personal home folder, which is the only one I have access to. I can't think of any other way around this. Am I just unable to install this library? Or can I "trick" it somehow into installing in in my home directory, where I have full admin rights?
I think You need to execute a command with root user privileges.
Because, make install command need root user privileges.
Like,
sudo make install
or with root user. Like,
sudo su
make install
Is there a simple guide available anywhere on how to install a recent version of Eclipse on Linux as a "normal" application?
The version in the Debian repositories, even for Debian 9, is a 3.X version of Eclipse, which must be very old, as they are now at V4.7.
The default method for the "eclipse.org" versions to install themselves is to put everything in the home directory, which is not a great approach for a system where the home directory is supposed to only contain user data (e.g. the whole home directory is backed up daily)
I can't believe that something so widely used does not have any good instructions for how to install it as a normal application would be - where all the application files are in a shared folder under /opt, and only user data is stored in the home folder.
I have found this thread, which may be promising:
https://www.eclipse.org/forums/index.php/t/1080525/
And a previous question seemed reasonably good, but on trying to follow it, the installer screens have changed, and everything about "bundle pools" became very confusing!
https://askubuntu.com/questions/695382/how-to-install-eclipse-using-its-installer
Not sure if you are still looking for an answer. This is how I have been doing for a few years now.
Download it from website and extract eclipse folder under /opt
Change ownership of the folder to your user and make it readonly recursively.
Create a desktop file to launch it as a regular user.
You can make the folder writable once in a month to make sure latest updates are installed then make the folder readonly again.
TL;DR give up now
I found this when Googling for how to do a multi-user install on Linux Mint 20.
Although Eclipse publish specific documentation on how to do a multi-user installation this little correlation with the current reality.
I first tried installing the package version of Eclipse. That installed the flatpak package, not a native package. It turns out that flatpak has a bug (opened in 2017) whereby it creates a new image each time you run the binary - and at 1.2G that was eating my enterprise storage very quickly. Although the package installed from the command line use apt it did not add any record to the installed package list - so I couldn't uninstall it with apt (using flatpak uninstall eclipse seems to have worked).
I then downloaded the tarball eclipse.
This has a GUI installer which would not run via [x]sudo - so I had to subvert the usual security model on Mint/Ubuntu and make the root user a logon account.
I specified the install location as /usr/local/eclipse. The installer did its thing. Sadly it did not provision a menu entry for the program. Since it actually installs in a sub-directory of the target named with versioning information (/usr/local/eclipse/jee-2019/12/) I created a shell script in /usr/local/bin/ to point to the binary (so when I upgrade, I just need to change the shell script to point to the new location). I then created a .desktop entry to run the shell script and ran:
xdg-desktop-menu install --novendor eclipse.desktop
I also copied the eclipse.desktop file to /etc/skel/Desktop and to /root/Desktop
From my root session, opening the .desktop file by double clicking, or running the shell script started eclipse.
Sadly, this did not create a start menu entry (it has worked for me with other applications).
Logging on a different user, copying the .desktop file to ~/Desktop and running it resulted in....
(Of course it would have been far too easy to display the failure reason in the dialog, or even put the path to the log file in a widget where I could copy and paste it)
Looking at /usr/local/eclipse/jee-2019/12//eclipse.ini, I find this:
-startup
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library
/root/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product
org.eclipse.epp.package.jee.product
-showsplash
/root/.p2/pool/plugins/org.eclipse.epp.package.common_4.14.0.20191212-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-11-openjdk-amd64/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
There is a whole catalog of issues here.
I replaced the relative path for -startup with an absolute one, copied /root/.p2/pool to /usr/local/eclipse/pool and updated the -startup and -showsplash entries in the file.
I got a whole new error message:
!SESSION Fri Feb 19 11:11:27 GMT 2021 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2021-02-19 11:11:27.893
!MESSAGE Could not find extension: reference:file:org.eclipse.osgi.compatibility.state_1.1.600.v20190814-1451.jar
!ENTRY org.eclipse.equinox.launcher 4 0 2021-02-19 11:11:28.070
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
...
I get exactly the same error after converting the Fedora 33 RPM to a .deb and installing that.
I'm going to go check the price of intellij licences.
I just found Matlab (2016a) put a 2.5 Gb installation files that it fetched during the installation in the root home directory (Linux mint 18), under /root/Downloads/MathWorks. I guess it is probably because I use sudo for installation.
My question is:
Is it normal that program store information when user executes it with sudo?
Can I delete the file under /root/Downloads? (My limited Linux knowledge told me do not touch anything in the /root folder)
When you execute anything with su...do, you basically execute it 'as' root.
Mathworks uses the Download-Folder (which is in your case /root/Downloads - since you have executed the installer as root) for temporary data (According to https://de.mathworks.com/matlabcentral/answers/229835-is-the-mathworks-folder-necessary-to-run-properly?requestedDomain=www.mathworks.com).
So, yes. It seems like you can delete the folder.
Or just move it to MathWorks.bak and check if Mathworks still works properly. In case everything is working fine, you can delete MathWorks.bak.
A program can do anything when run as sudo and depends only on what the program is designed to do. sudo simply elevates the permissions when running a given command.
I would have thought that the installer would have downloaded everything to /tmp instead of /root/Downloads, but as long as you didn't select /root/Downloads as your installation directory for MATLAB and this is only the temporary download location you can certainly remove it after successfully installing MATLAB to a "typical" location such as /usr/local/MATLAB/R2016a.
I am developing with Xampp for Linux and Tomcat (similar to Xampp on Windows). Many programs like /IDEA, Tomcat and Xampp are recommended to be installed under /opt Now I have heard that it is not recommended to run services as root, but on Ubuntu (I am using this) unpacking any directory to /opt implies that it belongs to root owner and root group. This may be specific to Xampp as per the instructions on their Linux page:
Step 2: Installation After downloading simply type in the following commands:
Go to a Linux shell and login as the system administrator root:
su
Extract the downloaded archive file to /opt:
tar xvfz xampp-linux-1.8.1.tar.gz -C /opt
Warning: Please use only this command to install XAMPP. DON'T use any Microsoft Windows tools to extract the archive, it won't work.
Warning 2: already installed XAMPP versions get overwritten by this command.
That's all. XAMPP is now installed below the /opt/lampp directory.
* Step 3: Start To start XAMPP simply call this command:
/opt/lampp/lampp start
Placing it here implies that Apache must be run as root as one is only able to run it with sudo on Ubuntu.
This may be an issue specific to Ubuntu. Is it? Because Xampp is a development tool I posted this here as I am more likely to find an appropriate answer here from developers who use it on Ubuntu (and other Linux systems). I would appreciate any information on if the same problem occurs on other systems, I notice my production environment has Tomcat installed in /opt too, but belongs to tomcat: tomcat
The question here is how to get around this for all tools under /opt, because even though Xampp may not be the tool for my needs, I still want to place Tomcat under /opt to replicate my production environment and the same thing will surely happen unless this is just a Ubuntu issue?
Ubuntu and some other distributions differ to the general Linux principle where the account that you create upon install of the OS is added to specific groups that can be viewed with the following command:
groups username
You will notice that root is not amongst these. It is also not possible to log in or su to the root account. sudo is most likey a command that has been granted permission to be used from other accounts so I imagine the 'sudo' command has a file permission of 775 for user: root:root
Thus launching services from /opt' does not run them asroot`
I have created an Ubuntu package to install my RCP app. The installed files are owned by root. Is it possible for a user to subsequently install updates through P2? Documentation about Eclipse multi-user installs suggests that it is possible, along with the answer to this question.
However, when I start up the application, it does not automatically check for updates as usual, and the Update Site that I had specified in p2.inf is not listed in the "Install New Software..." dialog.
Using the -configuration or -data runtime options did not help.
I can make it work with a hack by running sudo chown -R <my_username> /opt/<my_app_installation>. When I subsequently launch the application, it does properly check for updates on startup, and my update site is properly listed in the "Install New Software..." dialog. Certainly I would prefer that whatever data it is writing to that installation directory be instead written to the user's home directory.
Supplementary info:
Here is a list of files and folders that showed up in my installation directory only after the directory was given ownership by <my_username> and the program was run.
/opt/<my_app_installation>/configuration/org.eclipse.core.runtime
/opt/<my_app_installation>/configuration/org.eclipse.equinox.app
/opt/<my_app_installation>/configuration/org.eclipse.osgi
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/1339896994308.profile.gz
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.scheduler.prefs
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.repository
More experimental results:
Even with a writable (chown'd) installation directory, no files are placed there when the
-configuration $HOME/.my_app_files runtime option is supplied.
There are lots of limitation of p2 itself for share install. AFAIK there is no significant improvement in latest release Juno as well.
But a guy from Redhat is working on p2 install with RPM package, you can read his progress in his blog post. The work and idea could be shared with Debian package.