cmake 出现错误后该怎么办?

cmake 出现错误后该怎么办?

我想在git clone之后从源代码安装软件。作者提供了以下步骤来安装它:

git submodule init
git submodule update
mkdir build;cd build
cmake ..
make
sudo make install

但是当我进入该步骤时cmake ..,出现错误:

    -- checking for module 'purple'
    --   package 'purple' not found
    CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
      A required package was not found
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
      CMakeLists.txt:18 (pkg_check_modules)


    -- checking for module 'glib-2.0'
    --   package 'glib-2.0' not found
    CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
      A required package was not found
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
      CMakeLists.txt:19 (pkg_check_modules)


    -- checking for module 'mozjs185'
    --   package 'mozjs185' not found
    CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
      A required package was not found
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
      CMakeLists.txt:20 (pkg_check_modules)


    libpurple version:Package purple was not found in the pkg-config search path.
    Perhaps you should add the directory containing `purple.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'purple' found
    libpurple version outdate
    -- checking for module 'libcurl'
    --   package 'libcurl' not found
    CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
      A required package was not found
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
      liblwqq/CMakeLists.txt:29 (pkg_check_modules)


    -- checking for module 'sqlite3'
    --   package 'sqlite3' not found
    CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
      A required package was not found
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
      liblwqq/CMakeLists.txt:30 (pkg_check_modules)


    CMake Error at src/CMakeLists.txt:38 (INSTALL):
      install TARGETS given no LIBRARY DESTINATION for module target "webqq".


    ===============================================
    -- With Libev (Option)     : NO
    -- Native Language Support : true
    -- Install Path            : 
    ===============================================
    -- Configuring incomplete, errors occurred!

在我安装了 glib-2.0 和 sqlite3 包之后,错误消息并没有改变!

更糟糕的是,该命令sudo apt-get install purple不起作用。

那么,我该怎么做才能完成该软件的安装?

答案1

要构建依赖于某些库的程序,您需要安装发展这些库的软件包。开发包通常与库同名,但-dev在末尾带有 ,例如libpurple-devfor libpurplelibsqlite3-devforlibsqlite3等。

根据您的日志您需要安装:

apt-get install libpurple-dev libglib2.0-dev libmozjs185-dev \
    libsqlite3-dev libcurl4-gnutls-dev

相关内容