Cmake is not available on Xenial, but the system info displays a cmake version

Trying to use cmake on Xenial (with the PHP image) triggers an error saying that cmake is not available.
But the Build system information section includes this info:

cmake version

cmake version 3.12.4

This is quite confusing. How is it reporting a cmake version if cmake is not installed ?

It’s there. How are you looking for it?

https://travis-ci.org/BanzaiMan/travis_production_test/builds/583771760#L233-L234

$ which cmake
/usr/local/cmake-3.12.4/bin/cmake

This is the error I got (in a build of a private repo) when I removed cmake from the list of packages of the APT addons:

.tools/travis/install_rabbitmq-c.sh: line 29: cmake: command not found

I am guessing that your script’s $PATH does not inherit from the build script’s.

hmm, it might be because the script is called with sudo. Would it be possible that this is the case ?

-E might help.

Imprint