I am pretty upset and frustrated while I am writing this post now. So, sorry for language mistakes and word choices in advance.
I have been using UR5 and UR5e for a couple of years, mostly using ROS. So I didn’t need a simulator for so long since I had the Gazebo. For the first time I saw that there is an offline simulator option for UR e-series for Linux, I got pretty excited and downloaded following this link: Universal Robots - Offline Simulator - e-Series - UR Sim for Linux 5.11.1
And then I followed as instructed and run the
install.sh. Then, the catastrophe started. The install shell started removing pretty much ALL of my packages and software in my PC! I immediately stop the shell and hope to save some but it was already way to late. For comparison, it removed all my ROS installations as well as a few more third party installations on my PC. I have the log file which I goes I cannot attach here but I am very much willing to share with any technical support.
Then I dig into the commands in
install.sh file and I was terrified.
pkexec bash -c "apt-get -y install lib32gcc1 lib32stdc++6 libc6-i386 $commonDependencies && (echo '$packages' | xargs dpkg -i --force-overwrite)"
This command would remove EVERYTHING without asking to the user, without giving any warning! It simply accepts everything with
-y option if the installation requires
sudo apt remove --purge application. I honestly believe that if ANYTHING which needs to be removed or version changed, it should be WARNED.
--force-overwrite is even more dangerous that even though the
-y option accepts the installation and remove automatically, by some chance some version mismatches would warn the user at some point. However, with this option, none of the other versions of any packages used by the ursim are allowed to be in your PC. That’s terrifying, honestly.
At the moment, I am looking at my removed 50+ packages and software with misty eyes. I wanted to create a new report about this issue because
- I warn other people about this catastrophic behavior of the installation script.
- Ask to developers to fix it
- Get some help if there is any chance to reverse it for my case. I have lots of packages which I am not using the latest version since I am a developer and need to keep some packages in their stable versions and I don’t have the list of every single 50+ packages versions up to date at the moment. For me to fix this wreck is more than manually installing all packages removed by looking at my log file.
A cherry on top: While trying to reproduce to error to make sure I didn’t mess up, a virtual machine is created using ubuntu 18.04 and ROS melodic installed only (no java was installed). The install.sh first installed java sdk 11 and then popped an error saying that the java version was not up to date… well… why on earth the the install script installed version 11, then? Makes no sense to me. Either don’t install any java version and throw an error in the first place or just simply install the required version.
And finally, yes, all packages were removed on the test virtual machine, too. So the problem is definitely reproducible.
Appreciated in any help,
It’s not just you, its always been the case and its shocking that it hasn’t been fixed.
There are several issues and hacky workarounds.
Issue: Clashing dependencies with ROS
URSim has a dependency on a
libcurl3, as does ROS. HOWEVER one is
libcurl3-gnutls while the other is
libcurl3-openssl and as these both share a common symbolic object they cannot be both installed at the same time.
This means that if you have ROS installed, the URSim install script removes
libcurl3 to install its version, and Ubuntu sees you’ve removed a critical dependency for ROS and therefore suggests you remove ROS as it is “no longer required” which the script automatically accepts.
This is the same thing that happens if you try to install
npm alongside ROS… not fun.
Workaround: Install URSim before ROS
Because both versions of libcurl3 share the same .so and the interface and feature set is predominantly the same, you can work around this by installing URSim first, and then installing ROS. This seems to work as whatever needed libcurl3 in URSim is able to deal with having the other version there instead. This is hacky for 2 reasons (apart from the obvious needing to make any changes to a provided install script/process…) you MUST have URSim installed before ROS. I am not sure if this means upgrading URSim will require you to wipe your ROS install, but I suspect it will. Secondly it is hacky because there may be features not available in the
libcurl3-openssl that is needed by URSim which assumes it has
Issue: Java version number
The URSim install script has a hacky and outdated java version checker. It is meant to check if the Java version is >= 6 but instead checks if it is >= 6 && < 10. HOWEVER the script is set up to install default-jre which installs java 11. This does not pass the version check test and returns the oh so useful error message of “Installed java version is too old, exiting”.
Workaround: Install Java 8 before running the install script
I tried removing/adjusting the java version check in the install script so that it would accept Java 11. I think it didn’t work as the buggy version check is also used somewhere else in the start up script.
Instead, you must install Java 8 before you run the script, or modify the script to install Java 8 for you.
sudo apt install openjdk-8-jdk openjdk-8-jre
Issue: Binaries not added to PATH
Fairly self explanatory, the script doesn’t put the bins in a bin folder that’s in PATH and didn’t add their own bin folder to PATH.
Workaround: Add it to PATH
echo -e "\nPATH="$PATH:$HOME/ursim-22.214.171.124288/usr/bin" >> ~/.profile source ~/.profile
Issue: Missing net-statistics script
URSim requires a net-statistics script to check the status of the network. This seems to be a custom script of theirs however they didn’t think to include it in the installation.
Workaround: Get a copy from elsewhere
I originally had to install the non-linux VM so that I could find the script and save a copy of it to put on my 18.04 install. I’ve got the file on a repo which has steps for installing URSim on 18.04. You can download and install it by running:
wget https://raw.githubusercontent.com/ljden/URSim_Install_Guides/main/src/net-statistics sudo mv net-statistics /sbin/ sudo chmod +x /sbin/net-statistics
Issue: net-statistics script breaks for Ubuntu 18.04
The script tries to parse the output of
ifconfig but is not compatible with 18.04.
Workaround: Use my modified script
Script downloaded from link above already has the fix applied, otherwise you will need to modify it, see: Fix bug in ifconfig parsing · ljden/URSim_Install_Guides@ae6c220 · GitHub
NB: You will need to ensure the net-statistics script has the right network device (see repo for more details)
I know the pain of having ROS completely uninstalled. hopefully it doesn’t set you back too badly.
It’s been a few months since I went through this pain so I may not have the exact details correct but I am fairly sure it is correct. As linked above, I forked a repo with instructions for 16.04 and updated it somewhat for 18.04. Didn’t have time to flesh it out with explanations or better solutions but it’s something. GitHub - ljden/URSim_Install_Guides: Basic installation guide for URSim on Ubuntu 18.04
Thank you very much for such a great explanation and many options to workaround. I hope it will be solved very soon because it can cause quite big problems for someone closing to a project deadline or like that. This installation script is removing many essential packages. Alongside ROS, OBS studio, Virtualbox, some of my cloud synchronization apps and more were removed too…
Anyways, I saved all my packages and apps. I can contribute at least for those who have been in the same situation as me. I use the
/var/log/apt/history.log file and “re-install” whatever is uninstalled with the recent command. Automatically, this can be used:
echo '#!/bin/bash' > restore echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore chmod +x restore ./restore sudo apt update
The automatic version may not work if any
apt command is computed after the files are removed. Then the regex command should be edited such that it gets the right
apt log in the history.log file.
My way of solving installation problem:
install.sh file such that I removed the following part completely:
commonDependencies='libcurl3 libjava3d-* ttf-dejavu* fonts-ipafont fonts-baekmuk fonts-nanum fonts-arphic-uming fonts-arphic-ukai' if [[ $(getconf LONG_BIT) == "32" ]] then Dependencies_32='libxmlrpc-c++8 libxmlrpc-core-c3' pkexec bash -c "apt-get -y install $commonDependencies $Dependencies_32" else #Note: since URController is essentially a 32-bit program #we have to add some 32 bit libraries, some of them picked up from the linux distribution #some of them are have been recompiled and are inside our ursim-dependencies directory in deb format packages=`ls $PWD/ursim-dependencies/*amd64.deb` pkexec bash -c "apt-get -y install lib32gcc1 lib32stdc++6 libc6-i386 $commonDependencies && (echo '$packages' | xargs dpkg -i --force-overwrite)" fi
And then installed them manually:
sudo apt install libxmlrpc-c++8v5:i386 libxmlrpc-core-c3 lib32gcc1 lib32stdc++6 libc6-i386
And then run the modified
install.sh script. Looks okay for now but I got the warning
The following packages were automatically installed and are no longer required: libcurl4:i386 libnghttp2-14:i386 libpsl5:i386 librtmp1:i386 so I suppose a
sudo apt autoremove at some point may cause problems with the ROS and other software again. I disregarded the no longer required warning for these specific packages just as a patch solution but probably not the best.
what an eye opening response. That script is outdated and dangerous to the host system.
UR really needs to work on their software tools that they are supplying to users
It’s honestly shocking, they have clearly never tested it outside their 14.04 lubuntu build they use for distributing the “non-linux” version.
I seem to recall there may have even been one or 2 other issues but I couldn’t remember them off the top of my head.
Lets hope something is done about it soon…
Thank you for pointing this topic out!
We have forwarded it internally and it is addressed right now.
I actually started wrapping URSim into a Ubuntu snap exactly for that reason. If anyone at UR is interested in my current progress, please contact me.