clickhouse 在centos源码安装
1.修改 CMakeLists.txt
vim CMakeLists.txt
option (USE_STATIC_LIBRARIES "Set to FALSE to use shared libraries" FALSE)
这条设置为 FALSE,如果不设置为false编译时会将 libmysqlclient.so ar 到 libmysqlclient.a libmysqlclient.a 其实为空。
2.报错
[ 78%] Building CXX object dbms/CMakeFiles/unit_tests_dbms.dir/src/Common/tests/gtest_rw_lock_fifo.cpp.cpp.o
../../dbms/libclickhouse.so.1.1.54288: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
libstdc++版本过低。到GCC6的安装目录下,将相应的库拷贝到/usr/lib64下,也许在其他目录下。