clickhouse安装 Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit)
问题描述:
centos 用如下命令安装clickhouse时
yum install -y clickhouse-server clickhouse-client
报错:
--> Running transaction check ---> Package clickhouse-client.x86_64 0:19.8.3.8-1.el7 will be installed ---> Package clickhouse-server.x86_64 0:19.8.3.8-1.el7 will be installed --> Processing Dependency: clickhouse-server-common = 19.8.3.8-1.el7 for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: clickhouse-common-static = 19.8.3.8-1.el7 for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicuuc.so.50()(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicui18n.so.50()(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicudata.so.50()(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Running transaction check ---> Package clickhouse-common-static.x86_64 0:19.8.3.8-1.el7 will be installed --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libc.so.6(GLIBC_2.16)(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicuuc.so.50()(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicui18n.so.50()(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicudata.so.50()(64bit) for package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 ---> Package clickhouse-server.x86_64 0:19.8.3.8-1.el7 will be installed --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libstdc++.so.6(CXXABI_1.3.5)(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicuuc.so.50()(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicui18n.so.50()(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 --> Processing Dependency: libicudata.so.50()(64bit) for package: clickhouse-server-19.8.3.8-1.el7.x86_64 ---> Package clickhouse-server-common.x86_64 0:19.8.3.8-1.el7 will be installed --> Finished Dependency Resolution Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libc.so.6(GLIBC_2.16)(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libicudata.so.50()(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libicuuc.so.50()(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libicudata.so.50()(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libicui18n.so.50()(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libicuuc.so.50()(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.17)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) Error: Package: clickhouse-common-static-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libicui18n.so.50()(64bit) Error: Package: clickhouse-server-19.8.3.8-1.el7.x86_64 (Altinity_clickhouse) Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
原因:
缺少libstdc++ 依赖
按照网上对libstdc++ 升级,又改/usr/lib/下的软连接,没什么用。后来注意到
--> Processing Dependency: clickhouse-common-static = 19.8.3.8-1.el7 for package: clickhouse-server-19.8.3.8-1.el7.x86_64
clickhouse-server-19.8.3.8-1.el7.x86_64 是centos7的包,我的系统是centos6,不一致导致找不到系统libstdc++的高版本。
突然想起来,自己下载安装脚本的时候,用的命令
curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo os = centos dist = 7 bash
发现系统版本指定错了。
解决:
修改vi /etc/yum.repos.d/Altinity_clickhouse.repo 文件
[Altinity_clickhouse]
name=Altinity_clickhouse
baseurl=https://packagecloud.io/Altinity/clickhouse/el/6/$basearch //将这行的7改为系统版本对应的的6
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/Altinity/clickhouse/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[Altinity_clickhouse-source]
name=Altinity_clickhouse-source
baseurl=https://packagecloud.io/Altinity/clickhouse/el/6/SRPMS //将这行的7改为系统版本对应的的6
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/Altinity/clickhouse/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
将对应的版本改为系统版本6后,
# yum clean all 清一下
然后再安装
yum install -y clickhouse-server clickhouse-client
完事!