我正在尝试在 centOS 6.4 64 位机器上安装 C++ MySQL 连接器。
我已经安装了 MySQL 5.6(一个服务器和客户端组件,以及一个额外的共享组件以获取 mysqlclient.s0 库)它似乎工作正常。
在该站点上,我找到了以下文件:
Red Hat/Oracle Enterprise Linux ver. 6 (x86, 64-bit), Compressed TAR Archive
阅读完 INSTALL 文件后,我尝试调用cmake .
,但收到关于缺少 CMakeLists.txt 的错误。
后来我发现我需要下拉窗格中的实际源代码:
Generic Linux (Architecture Independent), Compressed TAR Archive
在源代码目录中有一个 CMakeLists.txt 文件,
我可以运行:cmake .
- 为什么还有平台特定的下载?
- 我可以只使用源代码吗?
当我运行 cmake 时。从目录中,我得到以下输出:
CMakeLists.txt 中的 CMake 警告 (dev):在线打开的逻辑块
/home/mysql-connector-c++-1.1.3-linux-el6-x86-64bit/source/CMakeLists.txt:39
(如果)
在线关闭
/home/mysql-connector-c++-1.1.3-linux-el6-x86-64bit/source/CMakeLists.txt:41
(万一)
与不匹配的论点。此警告适用于项目开发人员。使用 -Wno-dev 来抑制它。
-- 环境编译标志:
-- 环境链接标志: CMakeLists.txt:120 (MESSAGE) 处的 CMake 错误:发现 Boost 或其一些库。如果不在标准位置,请设置 -DBOOST_ROOT:STRING=-- 配置不完整,出现错误!
这是 CMakeLists.txt:39-41 周围行的内容:
if(COMMAND cmake_policy AND POLICY CMP0015)
cmake_policy(SET CMP0015 NEW)
endif(COMMAND cmake_policy)
这是 CMakeLists.txt:120 周围行的内容:
IF(NOT Boost_FOUND)
# Try dynamic
set(Boost_USE_STATIC_LIBS FALSE)
FIND_PACKAGE(Boost COMPONENTS ${MYSQLCPPCONN_BOOST_COMPONENTS})
IF(NOT Boost_FOUND)
MESSAGE(FATAL_ERROR "Boost or some of its libraries found. If not in standard place please set -DBOOST_ROOT:STRING=")
ENDIF(NOT Boost_FOUND)
ENDIF(NOT Boost_FOUND)
- 我不明白。它找到了升压组件还是没有?如果确实如此,为什么这是一个错误?
我已经安装/更新了 boost 组件: yum install boost 这是 a 的输出:
查找 / -name提升
/usr/lib64/libboost_system-mt.so.5 /usr/lib64/libboost_system.so.5 /usr/lib64/libboost_graph-mt.so.5 /usr/lib64/libboost_filesystem-mt.so.5 /usr/lib64 /libboost_date_time-mt.so.5 /usr/lib64/libboost_wserialization-mt.so.5 /usr/lib64/libboost_unit_test_framework.so.5 /usr/lib64/libboost_filesystem.so.5 /usr/lib64/libboost_prg_exec_monitor.so.5 /usr/lib64/libboost_signals-mt.so.5 /usr/lib64/libboost_date_time.so.5 /usr/lib64/libboost_regex.so.5 /usr/lib64/libboost_prg_exec_monitor-mt.so.5 /usr/lib64/libboost_wave -mt.so.5 /usr/lib64/libboost_serialization-mt.so.5 /usr/lib64/libboost_program_options-mt.so.5 /usr/lib64/libboost_graph.so.5 /usr/lib64/libboost_signals.so.5 /usr/lib64/libboost_python.so.5 /usr/lib64/libboost_iostreams.so.5 /usr/lib64/libboost_serialization.so.5 /usr/lib64/libboost_python-mt.so.5 /usr/lib64/libboost_unit_test_framework-mt .so.5 /usr/lib64/libboost_iostreams-mt.so.5 /usr/lib64/libboost_program_options.so.5 /usr/lib64/libboost_regex-mt.so.5 /usr/lib64/libboost_thread-mt.so.5 / usr/lib64/libboost_wserialization.so.5 /usr/include/c++/4.4.4/tr1_impl/boost_sp_counted_base.h /usr/include/c++/4.4.4/bits/boost_concept_check.h /usr/share/icons/oxygen/ 22x22/actions/mixer-microphone-front-boost.png /usr/share/icons/oxygen/22x22/actions/mixer-microphone-boost.png /usr/share/doc/boost-regex-1.41.0 /usr/共享/doc/boost-signals-1.41.0 /usr/share/doc/boost-system-1.41.0 /usr/share/doc/boost-iostreams-1.41.0 /usr/share/doc/boost-thread- 1.41.0 /usr/share/doc/boost-filesystem-1.41.0 /usr/share/doc/boost-program-options-1.41.0 /usr/share/doc/boost-test-1.41.0 /usr/共享/doc/boost-wave-1.41.0 /usr/share/doc/boost-date-time-1.41.0 /usr/share/doc/boost-python-1.41。0 /usr/share/doc/boost-serialization-1.41.0 /usr/share/doc/boost-graph-1.41.0 /var/lib/yum/yumdb/b/c353df239962740ed530d499bb76180201aa8a1f-boost-program-options-1.41。 0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/b2292fc632d0f893a2efc41c077bcc88a83649cc-boost-filesystem-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/137b574a8590a642229c2eaa20c0c98bd4c367e8-boost-python- 1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/54cc53886ae5c9f0a36e3e55abe8cc44d30b0c88-boost-date-time-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/b17dfa289b3c0e615f7e598c288dbc09dcce09b6- boost-wave-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/5cca310e29fc5639ae673069c639327b03029c2e-boost-serialization-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/ c5bea6cfd9e95fb42d1ff7ff26068f52dde8d3c0-boost-test-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/4426c89bd11acd85e92fb4eafe011351944a81ea-boost-1.41。0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/e6fddb18e7fd66b59d3cb6aa5061436592ee81ef-boost-iostreams-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/6b2fcabdebbbf0f3dda98bad6ea4c259b366f571-boost-signals- 1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/8bda127d59cc392fe94ec251d3514c7512100333-boost-system-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/d75110a5f95a50a32cd3554afd35a95d3c3c1eea-boost- regex-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/f06fb95c4bcec8c01bd24bf89600ca743b13f6bd-boost-thread-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/a44d43b7ec316bf9e52b6d16973775c7a99271df- boost-graph-1.41.0-17.el6_4-x86_64el6_4-x86_64 /var/lib/yum/yumdb/b/8bda127d59cc392fe94ec251d3514c7512100333-boost-system-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/d75110a5f95a50a32cd3554afd35a95d3c3c1eea-boost-regex-1.41.0- 17.el6_4-x86_64 /var/lib/yum/yumdb/b/f06fb95c4bcec8c01bd24bf89600ca743b13f6bd-boost-thread-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/a44d43b7ec316bf9e52b6d16973775c7a99271df-boost-graph-1.41. 0-17.el6_4-x86_64el6_4-x86_64 /var/lib/yum/yumdb/b/8bda127d59cc392fe94ec251d3514c7512100333-boost-system-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/d75110a5f95a50a32cd3554afd35a95d3c3c1eea-boost-regex-1.41.0- 17.el6_4-x86_64 /var/lib/yum/yumdb/b/f06fb95c4bcec8c01bd24bf89600ca743b13f6bd-boost-thread-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/a44d43b7ec316bf9e52b6d16973775c7a99271df-boost-graph-1.41. 0-17.el6_4-x86_64
我试图运行 cmake 。没有运气的以下参数:
cmake . -DBOOST_ROOT:STRING=/usr/lib64/
和
cmake . -DBOOST_ROOT:STRING=/usr/share/doc/
任何帮助将不胜感激!