I followed this example to install Brotli for Apache (2.4.58 with RHEL 7.2).
sudo yum install wget
sudo yum install perl
sudo yum install gcc
sudo yum install pcre-devel
sudo yum install cmake.x86_64
cd ~
mkdir sources
cd sources
git clone https://github.com/google/brotli.git
cd brotli/
git checkout v1.0
mkdir out && cd out
../configure-cmake
When I ran to ../configure-cmake, it threw an error:
-bash: ../configure-cmake: No such file or directory
I've tried searching for any solutions to the error but got nothing. Then I got stuck.
I don't know how to continue, can anyone help me?
Edit:
According to the official example, I tried the cmake way.
Just continuing from where I was stuck:
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed ..
CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
CMake 3.15 or higher is required. You are running version 2.8.12.2
So I checked the version of cmake:
$ cmake --version
cmake version 2.8.12.2
I tried sudo yum install cmake to install a newer version, but the version that appeared was still 2.8.12. So I removed it and installed cmake3.
Remove cmake 2.8.12.2:
$ sudo yum remove cmake
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
...............
Remove 1 Package
Installed size: 20 M
Is this ok [y/N]: y
...............
Removed:
cmake.x86_64 0:2.8.12.2-4.25.amzn1
Complete!
Check if it is deleted:
$ cmake --version
-bash: /usr/bin/cmake: No such file or directory
Install cmake3:
$ sudo yum install cmake3
Loaded plugins: priorities, update-motd, upgrade-helper
--> Running transaction check
...............
Installed:
cmake3.x86_64 0:3.17.5-1.3.amzn1
Dependency Installed:
cmake3-data.noarch 0:3.17.5-1.3.amzn1
Complete!
Check if it is installed:
$ cmake --version
-bash: /usr/bin/cmake: No such file or directory
So, the command must be changed to cmake3 from now on:
$ cmake3 --version
cmake3 version 3.17.5
$ whereis cmake3
cmake3: /usr/bin/cmake3 /usr/lib64/cmake3 /usr/share/cmake3
Okay, go back to where I was stuck:
$ cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed ..
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type is 'Release'
-- Performing Test BROTLI_EMSCRIPTEN
-- Performing Test BROTLI_EMSCRIPTEN - Failed
-- Compiler is not EMSCRIPTEN
-- Looking for log2
-- Looking for log2 - not found
-- Looking for log2
-- Looking for log2 - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ec2-user/brotli
$ cmake3 --build . --config Release --target install
Error: could not load cache
I searched for this error but got no help, the free space of the disk is about 30GB. Does anyone have any suggestions?