Ernesto_Che
Ernesto_Che

Reputation: 77

Can't update CMake

I tried to get the latest version of CMake, as OpenSUSE is stuck to 3.5.2.

version=3.10
build=2
mkdir ~/temp
cd ~/temp
wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
tar -xzvf cmake-$version.$build.tar.gz
cd cmake-$version.$build/
./bootstrap
make -j3
sudo make install

But something went silently wrong:

VM-LINUX:~/temp/cmake-3.10.2 # cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake
cmake version 3.5.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

So I tried another way: change the version in the update repositories! And then I discovered that che CMake package is stuck at version 3.5.2 in OpenSUSE 42.3.

How can I add a repository so that I always have the latest version?

I'm a total newbie of Linux.

Upvotes: 2

Views: 7826

Answers (3)

Nathan Mills
Nathan Mills

Reputation: 2279

I had the same error regarding CMAKE_ROOT when installing CMake 3.12 from Git. The solution for me was to run:

sudo ln -s /usr/local/share/cmake-3.12 /usr/local/share/cmake

as it had installed in cmake-3.12 directory instead of cmake directory for some reason.

Upvotes: 1

ztdep
ztdep

Reputation: 381

Opensuse has provided Tumbleweed and Leap for us. Tumbleweed always includes the newest packages.
 Leap has the most stable version packages.

Regards

Upvotes: 0

Florian
Florian

Reputation: 43030

I assume you were following "How do I install the latest version of cmake from the command line?".

I had the same problem and your problem/solution is to be found in the comments:

When I ran this, I got an error CMake Error: Could not find CMAKE_ROOT !!! and it failed to update cmake. – Timothy Swan Dec 25 '17 at 21:47

This is not a solution to UPDATE but to INSTALL cmake. Try this command or google it to find a solution: sudo apt-get remove cmake cmake-data - Teocci Dec 26 '17 at 2:18

Upvotes: 0

Related Questions