How To Install llvm-googletest on CentOS 8

llvm-googletest is LLVM’s modified googletest sources LLVM’s modified googletest sources

Introduction

In this tutorial we learn how to install llvm-googletest on CentOS 8.

What is llvm-googletest

LLVM’s modified googletest sources. llvm-googletest 11.0.0 2.module_el8.4.0+587+5187cac0 x86_64 335 k llvm-11.0.0-2.module_el8.4.0+587+5187cac0.src.rpm appstream LLVM’s modified googletest sources http NCSA LLVM’s modified googletest sources.

We can use yum or dnf to install llvm-googletest on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install llvm-googletest.

Install llvm-googletest on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install llvm-googletest using dnf by running the following command:

sudo dnf -y install llvm-googletest

Install llvm-googletest on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install llvm-googletest using yum by running the following command:

sudo yum -y install llvm-googletest

How To Uninstall llvm-googletest on CentOS 8

To uninstall only the llvm-googletest package we can use the following command:

sudo dnf remove llvm-googletest

llvm-googletest Package Contents on CentOS 8

/usr/lib/libLLVMTestingSupport.a
/usr/share/licenses/llvm-googletest
/usr/share/licenses/llvm-googletest/LICENSE.TXT
/usr/share/llvm/src/utils
/usr/share/llvm/src/utils/UpdateTestChecks
/usr/share/llvm/src/utils/UpdateTestChecks/__init__.py
/usr/share/llvm/src/utils/UpdateTestChecks/asm.py
/usr/share/llvm/src/utils/UpdateTestChecks/common.py
/usr/share/llvm/src/utils/unittest
/usr/share/llvm/src/utils/unittest/CMakeLists.txt
/usr/share/llvm/src/utils/unittest/LLVMBuild.txt
/usr/share/llvm/src/utils/unittest/UnitTestMain
/usr/share/llvm/src/utils/unittest/UnitTestMain/CMakeLists.txt
/usr/share/llvm/src/utils/unittest/UnitTestMain/TestMain.cpp
/usr/share/llvm/src/utils/unittest/googlemock
/usr/share/llvm/src/utils/unittest/googlemock/LICENSE.txt
/usr/share/llvm/src/utils/unittest/googlemock/README.LLVM
/usr/share/llvm/src/utils/unittest/googlemock/include
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
/usr/share/llvm/src/utils/unittest/googlemock/src
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-all.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-cardinalities.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-internal-utils.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-matchers.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-spec-builders.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock.cc
/usr/share/llvm/src/utils/unittest/googletest
/usr/share/llvm/src/utils/unittest/googletest/LICENSE.TXT
/usr/share/llvm/src/utils/unittest/googletest/README.LLVM
/usr/share/llvm/src/utils/unittest/googletest/include
/usr/share/llvm/src/utils/unittest/googletest/include/gtest
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-death-test.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-message.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-param-test.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-printers.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-spi.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-test-part.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-typed-test.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest_pred_impl.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest_prod.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/gtest-port.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/gtest.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-internal.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-port.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-string.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h
/usr/share/llvm/src/utils/unittest/googletest/src
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-all.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-death-test.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-filepath.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-internal-inl.h
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-port.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-printers.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-test-part.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-typed-test.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest.cc
/usr/share/llvm/src/utils/update_cc_test_checks.py
/usr/lib64/libLLVMTestingSupport.a
/usr/share/licenses/llvm-googletest
/usr/share/licenses/llvm-googletest/LICENSE.TXT
/usr/share/llvm/src/utils
/usr/share/llvm/src/utils/UpdateTestChecks
/usr/share/llvm/src/utils/UpdateTestChecks/__init__.py
/usr/share/llvm/src/utils/UpdateTestChecks/asm.py
/usr/share/llvm/src/utils/UpdateTestChecks/common.py
/usr/share/llvm/src/utils/unittest
/usr/share/llvm/src/utils/unittest/CMakeLists.txt
/usr/share/llvm/src/utils/unittest/LLVMBuild.txt
/usr/share/llvm/src/utils/unittest/UnitTestMain
/usr/share/llvm/src/utils/unittest/UnitTestMain/CMakeLists.txt
/usr/share/llvm/src/utils/unittest/UnitTestMain/TestMain.cpp
/usr/share/llvm/src/utils/unittest/googlemock
/usr/share/llvm/src/utils/unittest/googlemock/LICENSE.txt
/usr/share/llvm/src/utils/unittest/googlemock/README.LLVM
/usr/share/llvm/src/utils/unittest/googlemock/include
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/gmock.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
/usr/share/llvm/src/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
/usr/share/llvm/src/utils/unittest/googlemock/src
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-all.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-cardinalities.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-internal-utils.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-matchers.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock-spec-builders.cc
/usr/share/llvm/src/utils/unittest/googlemock/src/gmock.cc
/usr/share/llvm/src/utils/unittest/googletest
/usr/share/llvm/src/utils/unittest/googletest/LICENSE.TXT
/usr/share/llvm/src/utils/unittest/googletest/README.LLVM
/usr/share/llvm/src/utils/unittest/googletest/include
/usr/share/llvm/src/utils/unittest/googletest/include/gtest
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-death-test.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-message.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-param-test.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-printers.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-spi.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-test-part.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest-typed-test.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest_pred_impl.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/gtest_prod.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/gtest-port.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/gtest.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-internal.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-port.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-string.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h
/usr/share/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h
/usr/share/llvm/src/utils/unittest/googletest/src
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-all.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-death-test.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-filepath.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-internal-inl.h
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-port.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-printers.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-test-part.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest-typed-test.cc
/usr/share/llvm/src/utils/unittest/googletest/src/gtest.cc
/usr/share/llvm/src/utils/update_cc_test_checks.py

References

Summary

In this tutorial we learn how to install llvm-googletest on CentOS 8 using yum and dnf.