尼玛二师兄 发表于 2015-09-12 09:05

哭了,安装mysql4.1.18编译错误

求助rhel6.1安装mysql4.1.18编译错误
rm -f libvio.a
ar cru libvio.a vio.o viosocket.o viossl.o viosslfactories.o
ranlib libvio.a
/bin/sh ../libtool --preserve-dup-deps --mode=link gcc-DDBUG_OFF -O3 -m64    -rdynamic-o test-ssltest-ssl.o ../dbug/libdbug.a libvio.a ../mysys/libmysys.a ../strings/libmystrings.a-lpthread -lcrypt -lnsl -lm-lpthread
/bin/sh ../libtool --preserve-dup-deps --mode=link gcc-DDBUG_OFF -O3 -m64    -rdynamic-o test-sslclienttest-sslclient.o ../dbug/libdbug.a libvio.a ../mysys/libmysys.a ../strings/libmystrings.a-lpthread -lcrypt -lnsl -lm-lpthread
gcc -DDBUG_OFF -O3 -m64 -rdynamic -o test-ssl test-ssl.o../dbug/libdbug.a libvio.a ../mysys/libmysys.a ../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm -lpthread
gcc -DDBUG_OFF -O3 -m64 -rdynamic -o test-sslclient test-sslclient.o../dbug/libdbug.a libvio.a ../mysys/libmysys.a ../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm -lpthread
/bin/sh ../libtool --preserve-dup-deps --mode=link gcc-DDBUG_OFF -O3 -m64    -rdynamic-o test-sslservertest-sslserver.o ../dbug/libdbug.a libvio.a ../mysys/libmysys.a ../strings/libmystrings.a-lpthread -lcrypt -lnsl -lm-lpthread
gcc -DDBUG_OFF -O3 -m64 -rdynamic -o test-sslserver test-sslserver.o../dbug/libdbug.a libvio.a ../mysys/libmysys.a ../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm -lpthread
make: Leaving directory `/root/tools/mysql-4.1.18/vio'
Making all in sql
make: Entering directory `/root/tools/mysql-4.1.18/sql'
if gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../include -I../regex -I.   -DDBUG_OFF -O3 -m64 -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -MT gen_lex_hash.o -MD -MP -MF ".deps/gen_lex_hash.Tpo" -c -o gen_lex_hash.o gen_lex_hash.cc; \
         then mv -f ".deps/gen_lex_hash.Tpo" ".deps/gen_lex_hash.Po"; else rm -f ".deps/gen_lex_hash.Tpo"; exit 1; fi
/bin/sh ../libtool --preserve-dup-deps --mode=link gcc-DDBUG_OFF -O3 -m64 -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL-rdynamic-o gen_lex_hashgen_lex_hash.o ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz   -lpthread -lcrypt -lnsl -lm-lpthread
gcc -DDBUG_OFF -O3 -m64 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -rdynamic -o gen_lex_hash gen_lex_hash.o../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -lpthread -lcrypt -lnsl -lm -lpthread
./gen_lex_hash > lex_hash.h
makeall-recursive
make: Entering directory `/root/tools/mysql-4.1.18/sql'
Making all in share
make: Entering directory `/root/tools/mysql-4.1.18/sql/share'
make: Nothing to be done for `all'.
make: Leaving directory `/root/tools/mysql-4.1.18/sql/share'
make: Entering directory `/root/tools/mysql-4.1.18/sql'
/bin/sh ../libtool --preserve-dup-deps --mode=link gcc-DDBUG_OFF -O3 -m64 -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL-rdynamic-o mysql_tzinfo_to_sqlmysql_tzinfo_to_sql.o -all-static ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz   -lpthread -lcrypt -lnsl -lm-lpthread
if gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../include -I../regex -I.   -DDBUG_OFF -O3 -m64 -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -MT sql_lex.o -MD -MP -MF ".deps/sql_lex.Tpo" -c -o sql_lex.o sql_lex.cc; \
         then mv -f ".deps/sql_lex.Tpo" ".deps/sql_lex.Po"; else rm -f ".deps/sql_lex.Tpo"; exit 1; fi
gcc -DDBUG_OFF -O3 -m64 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -rdynamic -o mysql_tzinfo_to_sql mysql_tzinfo_to_sql.o -static../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -lpthread -lcrypt -lnsl -lm -lpthread
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** 错误 1
make: *** 正在等待未完成的任务....
make: Leaving directory `/root/tools/mysql-4.1.18/sql'
make: *** 错误 1
make: Leaving directory `/root/tools/mysql-4.1.18/sql'
make: *** 错误 2
make: Leaving directory `/root/tools/mysql-4.1.18/sql'
make: *** 错误 1
make: Leaving directory `/root/tools/mysql-4.1.18'
make: *** 错误 2

lyhabc 发表于 2015-09-12 23:39

还在用mysql-4.1???

csoho2000 发表于 2015-09-20 17:31

编译的时候出现"/usr/bin/ld: cannot find -lz"错误,需要安装zlib-dev这个包
页: [1]
查看完整版本: 哭了,安装mysql4.1.18编译错误