Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colmap building error: Could not find a package configuration file provided by "Ceres" #12

Closed
wzb1005 opened this issue Sep 15, 2018 · 4 comments

Comments

@wzb1005
Copy link

wzb1005 commented Sep 15, 2018

Hi,
when I am building the "colmap", I met the problem below:
CMake Error at CMakeLists.txt:87 (find_package):
By not providing "FindCeres.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Ceres", but
CMake did not find one.

Could not find a package configuration file provided by "Ceres" with any of
the following names:

CeresConfig.cmake
ceres-config.cmake

Add the installation prefix of "Ceres" to CMAKE_PREFIX_PATH or set
"Ceres_DIR" to a directory containing one of the above files. If "Ceres"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!
How to solve it?

@ahojnnes
Copy link
Owner

ahojnnes commented Sep 15, 2018 via email

@BETLOG
Copy link

BETLOG commented Nov 8, 2020

I realise its trivial to people who do this all day, but for people copying and pasting it requires a tiny bit more consideration towards the precise correctness of the directions given.
ie: vis: https://colmap.github.io/install.html
Is perfectly clear, but if the user doesnt add several "cd ~" at the right places the process fails and no doubt creates a bunch of nested copies of source in the wrong places.
...after having it fail and realising this I deleted everything and pasted this (with my various 'cd ~' inclusions), and now it works as easily as the instructions suggest.

cd ~ # betlog
# 
git clone https://github.com/colmap/colmap
# 
sudo apt-get install \
    git \
    cmake \
    build-essential \
    libboost-program-options-dev \
    libboost-filesystem-dev \
    libboost-graph-dev \
    libboost-regex-dev \
    libboost-system-dev \
    libboost-test-dev \
    libeigen3-dev \
    libsuitesparse-dev \
    libfreeimage-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libglew-dev \
    qtbase5-dev \
    libqt5opengl5-dev \
    libcgal-dev
# 
# Under Ubuntu 16.04/18.04 the CMake configuration scripts of CGAL are broken and you must also install the CGAL Qt5 package:
# 
sudo apt-get install libcgal-qt5-dev
sudo apt-get install libatlas-base-dev libsuitesparse-dev
# 
cd ~ # betlog
# 
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
git checkout $(git describe --tags) # Checkout the latest release
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
make -j
sudo make install
# 
cd ~ # betlog
# 
git clone https://github.com/colmap/colmap.git
cd colmap
git checkout dev
mkdir build
cd build
cmake ..
make -j
sudo make install
# 
cd ~ # betlog
# 
# Under newer Ubuntu versions it might be necessary to explicitly select the used GCC version due to compatiblity issues with CUDA, which can be done as:
# 
# # # # # # # CC=/usr/bin/gcc-6 CXX=/usr/bin/g++-6 cmake ..
# 
# 
# Run COLMAP:
# 
colmap -h
colmap gui

@AlexBlck
Copy link

In my case, I had to chmod change permissions to /usr/local/lib/cmake/, since /usr/local/lib/cmake/Ceres was there, but couldn't be read.

@Kai-46
Copy link

Kai-46 commented Sep 6, 2022

In my case, I had to chmod change permissions to /usr/local/lib/cmake/, since /usr/local/lib/cmake/Ceres was there, but couldn't be read.

I encountered the same issue while working with AWS instances, and managed to solve it by changing the permission sudo chmod -R 777 /usr/local/lib/cmake/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants