0

I am trying to attempt a project in whiche googletest is used for testing. I cloned the google test and did the following:

cd googletest mkdir build cd build cmake .. make make install

When I do the last line (make install) I get this error

    Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/gmock
CMake Error at googlemock/cmake_install.cmake:41 (file):
  file INSTALL cannot set permissions on "/usr/local/include/gmock":
  Operation not permitted.
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)

Does anyone have any ideas on a way to fix this? Also I should note I had this working before but when I went to run the tests, I would get errors in Gtest because the code I am testing uses C++17. Any help would be appreciated.

1 Answer 1

1

That should help:

sudo make install
Sign up to request clarification or add additional context in comments.

4 Comments

Why? What does this do?
sudo gives you administrator privileges, which you need in order to copy files to /use/local
I meant the make install part.
It will copy the artifacts(header files) to /user/local/include dir.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.