简体   繁体   English

安装c ++ mySQL连接器时出错

[英]error installing c++ mySQL connector

I'm trying to install a C++ MySQL connector on a centOS 6.4 64bit machine. 我正在尝试在centOS 6.4 64位计算机上安装C ++ MySQL连接器。
I've installed MySQL 5.6 ( a server and client component, and an additional shared component in order to get the mysqlclient.s0 libraries ) It seems to work fine. 我已经安装了MySQL 5.6(一个服务器和客户端组件,以及一个附加的共享组件,以便获得mysqlclient.s0库),看来工作正常。

On the site I've found the following file : 在该网站上,我找到了以下文件:
Red Hat/Oracle Enterprise Linux ver. 红帽/ Oracle企业Linux版本。 6 (x86, 64-bit), Compressed TAR Archive After reading the INSTALL file I've tried to invoke cmake . 6(x86,64位),压缩的TAR归档文件读取INSTALL文件后,我尝试调用cmake . , but got an error about a missing CMakeLists.txt. ,但收到有关缺少CMakeLists.txt的错误。
Later I found out I need the actual source code in the drop down pane : 后来我在下拉窗格中发现我需要实际的源代码:
Generic Linux (Architecture Independent), Compressed TAR Archive there is a CMakeLists.txt file in the directory of the the source code 通用Linux(与体系结构无关),压缩的TAR存档 ,在源代码目录中有一个CMakeLists.txt文件
and I am able to run : cmake . 而且我能够跑: cmake .

  • why is there also the platform specific download ? 为什么也有特定于平台的下载?
  • Can I get by with only the source code ? 我可以只使用源代码吗?

when I run cmake . 当我跑cmake的时候。 from the directory, I get the following output: 从目录中,我得到以下输出:

CMake Warning (dev) in CMakeLists.txt: A logical block opening on the line CMakeLists.txt中的CMake警告(dev):在线上打开的逻辑块

 /home/mysql-connector-c++-1.1.3-linux-el6-x86-64bit/source/CMakeLists.txt:39 

(if) (如果)

closes on the line 收线

 /home/mysql-connector-c++-1.1.3-linux-el6-x86-64bit/source/CMakeLists.txt:41 

(endif) (万一)

with mis-matching arguments. 参数不匹配。 This warning is for project developers. 此警告是针对项目开发人员的。 Use -Wno-dev to suppress it. 使用-Wno-dev禁止它。

-- Environment compile flags: -环境编译标志:
-- Environment link flags: CMake Error at CMakeLists.txt:120 (MESSAGE): Boost or some of its libraries found. -环境链接标志:CMakeLists.txt:120上的CMake错误:(MESSAGE):找到Boost或其某些库。 If not in standard place please set -DBOOST_ROOT:STRING= 如果不在标准位置,请设置-DBOOST_ROOT:STRING =

-- Configuring incomplete, errors occurred! -配置不完整,发生错误!

this is the content of lines around line CMakeLists.txt:39-41 : 这是CMakeLists.txt:39-41行周围的内容:

if(COMMAND cmake_policy AND POLICY CMP0015)
    cmake_policy(SET CMP0015 NEW)
endif(COMMAND cmake_policy)

this is the content of lines around line CMakeLists.txt:120 : 这是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)
  • I don't understand. 我不明白 did it find the boost components or it didn't ? 它找到了助推器组件还是没有找到? and if it did, why is this an error? 如果是这样,为什么会出错?
  • I've installed/updated boost components with : yum install boost this is the output of a : 我已经使用以下命令安装/更新了boost组件:yum install boost这是a的输出:

    find / -name boost 查找/-名称提升

    /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_thre /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_regex-mt.so.5 / usr / lib64 / libboost_thre ad-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/share/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/share/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/1 ad-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/share/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-files-1.41.0测试1.41.0 /usr/share/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 / 1 37b574a8590a642229c2eaa20c0c98bd4c367e8-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/f06fb95c4bcec8c01bd 37b574a8590a642229c2eaa20c0c98bd4c367e8-boost-python-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/54cc53886ae5c9f0a36e3e55ebeacc8d44b30b0c88-boost-date_time_y4-var/1.41.086。 yumdb / b / b17dfa289b3c0e615f7e598c288dbc09dcce09b6-boost-wave-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/5cca310e29fc5639ae673069c639327b03029c2e-boost-serialization_var/1.44-86-17。 yum / yumdb / b / c5bea6cfd9e95fb42d1ff7ff26068f52dde8d3c0-boost-test-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/4426c89bd11acd85e92fb4eafe011351944_81-el-boost-4.0-64-81-el-boost-64 yum / yumdb / b / e6fddb18e7fd66b59d3cb6aa5061436592ee81ef-boost-iostreams-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/6b2fcabdebbbf0f3dda98bad6ea4cost-b76f6-64-1.04 lib / yum / yumdb / b / 8bda127d59cc392fe94ec251d3514c7512100333-boost-system-1.41.0-17.el6_4-x86_64 /var/lib/yum/yumdb/b/d75110a5f95a50a32cd3554afd35a95d3c3c1eea-boost-regex-1.4-1.4 var / lib / yum / yumdb / b / f06fb95c4bcec8c01bd 24bf89600ca743b13f6bd-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 24bf89600ca743b13f6bd-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

I've tried to run the cmake . 我已经试过了。 with the following parameters without luck : 具有以下没有运气的参数:

cmake . -DBOOST_ROOT:STRING=/usr/lib64/

and

cmake . -DBOOST_ROOT:STRING=/usr/share/doc/

Any help will be greatly appreciated! 任何帮助将不胜感激!

Instead of trying to make it work with the dynamic libraries that were found under : 与其尝试使动态库在以下位置找到,不如尝试使其工作:
/usr/lib64/ (I had any libraries because I've ran : yum install boost ) / usr / lib64 /(我有任何库,因为我运行过: yum install boost
I've decided to try with static ones. 我决定尝试使用静态的。 After I've downloaded boost : I just had to point to the parent directory : 下载boost之后 :我只需要指向父目录:

cmake . -DBOOST_ROOT:STRING=/home/boost_1_54_0/

and the cmake finished without a problem. 并且cmake顺利完成。

One might try to make the cmake process work with the dynamic libraries, but the CMakeLists.txt file should be edited accordingly. 可能会尝试使cmake进程与动态库一起使用,但应相应地编辑CMakeLists.txt文件。 for example 例如

SET(Boost_USE_STATIC_LIBS TRUE) 

should be changed. 应该改变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM