How can I update/remove cmake without partially deleting my ROS distribution?
Problem (TL;DR)
I need to update my cmake from version 2.8.12.2 to version 3.1 or higher. However this requires removing the previous version with the command: sudo apt remove cmake
. This identifies several ROS files and deletes them. Having done this before, I can confirm that this command will completely break your ROS distribution, requiring a full reinstall to fix. So my question is: Is there a way to update cmake without removing the previous version or by avoid deleting the ROS files?
Problem (detailed)
According to other forums on the internet, updating cmake requires deleting the previous version with the command sudo apt remove cmake
. The problem is that this command identifies many files from my ROS distribution and marks them for deletion e.g:
matt@matt:~$ sudo apt remove cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
... lots of miscellaneous packages ...
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
cmake ros-indigo-actionlib ros-indigo-actionlib-msgs
ros-indigo-actionlib-tutorials ros-indigo-amcl ros-indigo-base-local-planner
ros-indigo-bond ros-indigo-bond-core ros-indigo-bondcpp ros-indigo-bondpy
... many, many more ROS files ...
ros-indigo-visualization-tutorials ros-indigo-viz ros-indigo-voxel-grid
ros-indigo-xacro
0 upgraded, 0 newly installed, 244 to remove and 347 not upgraded.
After this operation, 159 MB disk space will be freed.
Do you want to continue? [Y/n]
The full message is very long, so I have provided it in a text file here: cmake_warning.txt
I ran this command last time I needed to update cmake, and it completely broke my ROS distribution, requiring a full reinstall to fix. I'd prefer to avoid that happening again, either by updating cmake without deleting the old version, or by somehow preventing the command from deleting ROS files. Any help or advice would be greatly appreciated.
I also realize that this is more of a general-Linux type question rather than one specific to ROS. However, because it affects ROS users, and has surely affected several people before me, I thought I would be more likely to find an answer here, and that any answer I do find will be more relevant here than on another forum like StackOverflow. Having said that, if anyone thinks that is where this question should be asked, I can certainly move it.
System details
- OS: Ubuntu 14.04
- ROS version: 1.11.21 (Indigo Igloo)
- GCC version: 4.8.4
- Cmake version: 2.8.12.2