摘要:錯誤如下命令查看執(zhí)行所需要的庫文件可以看到中是一個文件這個問題我也卡了很久,沒找到有效資料,這條命令并不適用可以用命令查看庫文件可以看到確實沒有版本解決辦法編譯安裝,過程就不在這里寫了,我直接用的原來編譯好的包,然后用里
錯誤如下:
root@solaris:/usr/local/mysql# /usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize ld.so.1: mysql: fatal: libCrunG3.so.1: open failed: No such file or directory Killed
ldd命令查看mysqld執(zhí)行所需要的庫文件
root@solaris:/usr/local/mysql# ldd /usr/local/mysql/bin/mysqld libstdc++.so.6 => /usr/lib/64/libstdc++.so.6 libstdc++.so.6 (GLIBCXX_3.4.20) => (version not found) libgcc_s.so.1 => /usr/lib/64/libgcc_s.so.1 libCrunG3.so.1 => (file not found) libc.so.1 => /lib/64/libc.so.1 libmtmalloc.so.1 => /usr/lib/64/libmtmalloc.so.1 libsocket.so.1 => /lib/64/libsocket.so.1 libnsl.so.1 => /lib/64/libnsl.so.1 libm.so.2 => /lib/64/libm.so.2 librt.so.1 => /lib/64/librt.so.1 libatomic.so.1 => /usr/lib/64/libatomic.so.1 libmp.so.2 => /lib/64/libmp.so.2 libucrypto.so.1 => /lib/64/libucrypto.so.1 libpthread.so.1 => /lib/64/libpthread.so.1 libelf.so.1 => /lib/64/libelf.so.1 libcryptoutil.so.1 => /lib/64/libcryptoutil.so.1 libz.so.1 => /lib/64/libz.so.1
可以看到Solaris11.3中l(wèi)ibstdc++.so.6是一個link文件
ls -l /usr/lib/64/libstdc++.so.6 lrwxrwxrwx 1 root root 19 Oct 17 17:45 /usr/lib/64/libstdc++.so.6 -> libstdc++.so.6.0.18
這個問題我也卡了很久,沒找到有效資料,string libstdc++.so.6.0.18 | grep GLIBCXX 這條命令并不適用Solaris11.3
可以用pvs命令查看庫文件
root@solaris:/usr/local/mysql# pvs /usr/lib/64/libstdc++.so.6.0.18 libm.so.2 (SUNW_1.2); libc.so.1 (SUNW_1.22, SUNWprivate_1.1); libgcc_s.so.1 (GCC_4.2.0); libstdc++.so.6; GLIBCXX_3.4; GLIBCXX_3.4.1; GLIBCXX_3.4.2; GLIBCXX_3.4.3; GLIBCXX_3.4.4; GLIBCXX_3.4.5; GLIBCXX_3.4.6; GLIBCXX_3.4.7; GLIBCXX_3.4.8; GLIBCXX_3.4.9; GLIBCXX_3.4.10; GLIBCXX_3.4.11; GLIBCXX_3.4.12; GLIBCXX_3.4.13; GLIBCXX_3.4.14; GLIBCXX_3.4.15; GLIBCXX_3.4.16; GLIBCXX_3.4.17; GLIBCXX_3.4.18; GLIBCXX_3.4.19; CXXABI_1.3; CXXABI_1.3.1; CXXABI_1.3.2; CXXABI_1.3.3; CXXABI_1.3.4; CXXABI_1.3.5; CXXABI_1.3.6; CXXABI_1.3.7; CXXABI_TM_1;
可以看到確實沒有GLIBCXX_3.4.20版本
解決辦法:
編譯安裝gcc4.9,過程就不在這里寫了,我直接用的原來編譯好的tar包,然后用gcc里面的庫文件代替libstdc++.so.6.0.18,過程如下
root@solaris:~# mkdir /usr/gcc root@solaris:~# tar -xf gcc4.9.tar.gz root@solaris:~# mv 4.9 /usr/gcc/ root@solaris:~# mv /usr/lib/64/libstdc++.so.6 /usr/lib/64/libstdc++.so.6.bak root@solaris:~# ln -s /usr/gcc/4.9/lib/amd64/libstdc++.so.6.0.20 /usr/lib/64/libstdc++.so.6
此時ldd查看
root@solaris:/usr/local/mysql# ldd ./bin/mysqld libstdc++.so.6 => /usr/lib/64/libstdc++.so.6 libgcc_s.so.1 => /usr/lib/64/libgcc_s.so.1 libCrunG3.so.1 => (file not found) libc.so.1 => /lib/64/libc.so.1 libmtmalloc.so.1 => /usr/lib/64/libmtmalloc.so.1 libsocket.so.1 => /lib/64/libsocket.so.1 libnsl.so.1 => /lib/64/libnsl.so.1 libm.so.2 => /lib/64/libm.so.2 librt.so.1 => /lib/64/librt.so.1 libatomic.so.1 => /usr/lib/64/libatomic.so.1 libpthread.so.1 => /lib/64/libpthread.so.1 libmp.so.2 => /lib/64/libmp.so.2 libucrypto.so.1 => /lib/64/libucrypto.so.1 libelf.so.1 => /lib/64/libelf.so.1 libcryptoutil.so.1 => /lib/64/libcryptoutil.so.1 libz.so.1 => /lib/64/libz.so.1
GLIBCXX的問題解決了,但是又提示libCrunG3.so.1找不到,把文件拷貝到/usr/lib/64/下
root@solaris:/usr/local/mysql# cp /root/libCrunG3.so.1 /usr/lib/64/
此時ldd mysqld已經(jīng)沒有報錯,可以開始初始化
root@solaris:~# /usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize 2018-10-17T10:41:29.143880Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-10-17T10:41:34.828810Z 0 [Warning] InnoDB: New log files created, LSN=45790 2018-10-17T10:41:35.756604Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2018-10-17T10:41:35.840912Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 386b2928-d1f9-11e8-9e9b-9e1aa5f0c1f7. 2018-10-17T10:41:35.843805Z 0 [Warning] Gtid table is not ready to be used. Table "mysql.gtid_executed" cannot be opened. 2018-10-17T10:41:35.845870Z 1 [Note] A temporary password is generated for root@localhost: L9!TrOyPaiiS root@solaris:/usr/local/mysql# ./support-files/mysql.server start Starting MySQL .Logging to "/usr/local/mysql/data/solaris.err". . SUCCESS! root@solaris:/usr/local/mysql# /usr/local/mysql/bin/mysql -uroot -p"L9!TrOyPaiiS" mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 2 Server version: 5.7.23 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type "help;" or "h" for help. Type "c" to clear the current input statement. mysql>
啟動過程可能還會遇到其他問題,這里就不寫了
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/17790.html
摘要:錯誤如下命令查看執(zhí)行所需要的庫文件可以看到中是一個文件這個問題我也卡了很久,沒找到有效資料,這條命令并不適用可以用命令查看庫文件可以看到確實沒有版本解決辦法編譯安裝,過程就不在這里寫了,我直接用的原來編譯好的包,然后用里 錯誤如下: root@solaris:/usr/local/mysql# /usr/local/mysql/bin/mysqld --user=mysql --bas...
閱讀 1519·2021-11-23 09:51
閱讀 3639·2021-09-26 09:46
閱讀 2125·2021-09-22 10:02
閱讀 1818·2019-08-30 15:56
閱讀 3319·2019-08-30 12:51
閱讀 2224·2019-08-30 11:12
閱讀 2060·2019-08-29 13:23
閱讀 2323·2019-08-29 13:16