今天安装 mysql-5.1.41 出现错误,看了一下 INSTALL-SOURCE ,后明白了所以把错误记下来了,错误大概如下:
 
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of void*... (cached) 8
checking for sched_yield... (cached) yes
checking for fdatasync... (cached) yes
checking for localtime_r... (cached) yes
checking whether byte ordering is bigendian... (cached) no
checking whether GCC atomic builtins are available... yes
checking whether pthread_t can be used by GCC atomic builtins... yes
checking whether Solaris libc atomic functions are available... checking for atomic_add_long... no
checking for atomic_cas_32... no
checking for atomic_cas_64... no
checking for atomic_cas_ulong... no
checking whether pthread_t can be used by Solaris libc atomic functions... no
checking size of pthread_t... 8
checking for x86 PAUSE instruction... yes
checking "for man pages to remove"... dropping ndbcluster embedded
configure: creating ./config.status
config.status: creating libmysql/libmysql.ver
config.status: creating zlib/Makefile
config.status: creating extra/yassl/Makefile
config.status: creating extra/yassl/taocrypt/Makefile
config.status: creating extra/yassl/taocrypt/benchmark/Makefile
config.status: creating extra/yassl/taocrypt/src/Makefile
config.status: creating extra/yassl/taocrypt/test/Makefile
config.status: creating extra/yassl/src/Makefile
config.status: creating extra/yassl/testsuite/Makefile
config.status: creating plugin/daemon_example/Makefile
config.status: creating plugin/fulltext/Makefile
config.status: creating storage/archive/Makefile
config.status: creating storage/blackhole/Makefile
config.status: creating storage/csv/Makefile
config.status: creating storage/example/Makefile
config.status: creating storage/federated/Makefile
config.status: creating storage/heap/Makefile
config.status: creating storage/ibmdb2i/Makefile
config.status: creating storage/innobase/Makefile
config.status: creating storage/innodb_plugin/Makefile
config.status: creating storage/myisam/Makefile
config.status: creating storage/myisammrg/Makefile
config.status: creating storage/ndb/Makefile
config.status: creating storage/ndb/docs/Makefile
config.status: creating storage/ndb/include/Makefile
config.status: creating storage/ndb/src/Makefile
config.status: creating storage/ndb/src/common/Makefile
config.status: creating storage/ndb/src/common/debugger/Makefile
config.status: creating storage/ndb/src/common/debugger/signaldata/Makefile
config.status: creating storage/ndb/src/common/logger/Makefile
config.status: creating storage/ndb/src/common/mgmcommon/Makefile
config.status: creating storage/ndb/src/common/portlib/Makefile
config.status: creating storage/ndb/src/common/transporter/Makefile
config.status: creating storage/ndb/src/common/util/Makefile
config.status: creating storage/ndb/src/cw/Makefile
config.status: creating storage/ndb/src/cw/cpcd/Makefile
config.status: creating storage/ndb/src/kernel/Makefile
config.status: creating storage/ndb/src/kernel/blocks/Makefile
config.status: creating storage/ndb/src/kernel/blocks/backup/Makefile
config.status: creating storage/ndb/src/kernel/blocks/dbdict/Makefile
config.status: creating storage/ndb/src/kernel/blocks/dbdih/Makefile
config.status: creating storage/ndb/src/kernel/blocks/dblqh/Makefile
config.status: creating storage/ndb/src/kernel/blocks/dbtup/Makefile
config.status: creating storage/ndb/src/kernel/error/Makefile
config.status: creating storage/ndb/src/kernel/vm/Makefile
config.status: creating storage/ndb/src/mgmapi/Makefile
config.status: creating storage/ndb/src/mgmclient/Makefile
config.status: creating storage/ndb/src/mgmsrv/Makefile
config.status: creating storage/ndb/src/ndbapi/Makefile
config.status: creating storage/ndb/test/Makefile
config.status: creating storage/ndb/test/ndbapi/Makefile
config.status: creating storage/ndb/test/ndbapi/bank/Makefile
config.status: creating storage/ndb/test/run-test/Makefile
config.status: creating storage/ndb/test/src/Makefile
config.status: creating storage/ndb/test/tools/Makefile
config.status: creating storage/ndb/tools/Makefile
config.status: creating pstack/Makefile
config.status: creating pstack/aout/Makefile
config.status: creating cmd-line-utils/readline/Makefile
config.status: creating Makefile
config.status: creating extra/Makefile
config.status: creating mysys/Makefile
config.status: creating unittest/Makefile
config.status: creating unittest/mytap/Makefile
config.status: creating unittest/mytap/t/Makefile
config.status: creating unittest/mysys/Makefile
config.status: creating unittest/examples/Makefile
config.status: creating strings/Makefile
config.status: creating regex/Makefile
config.status: creating storage/Makefile
config.status: creating man/Makefile
config.status: creating BUILD/Makefile
config.status: creating vio/Makefile
config.status: creating libmysql/Makefile
config.status: creating libmysql_r/Makefile
config.status: creating client/Makefile
config.status: creating sql/Makefile
config.status: creating sql/share/Makefile
config.status: creating sql/sql_builtin.cc
config.status: creating sql-common/Makefile
config.status: creating dbug/Makefile
config.status: creating scripts/Makefile
config.status: creating include/Makefile
config.status: creating tests/Makefile
config.status: creating Docs/Makefile
config.status: creating support-files/Makefile
config.status: creating support-files/MacOSX/Makefile
config.status: creating support-files/RHEL4-SElinux/Makefile
config.status: creating server-tools/Makefile
config.status: creating server-tools/instance-manager/Makefile
config.status: creating cmd-line-utils/Makefile
config.status: creating cmd-line-utils/libedit/Makefile
config.status: creating libmysqld/Makefile
config.status: creating libmysqld/examples/Makefile
config.status: creating mysql-test/Makefile
config.status: creating mysql-test/lib/My/SafeProcess/Makefile
config.status: creating netware/Makefile
config.status: creating sql-bench/Makefile
config.status: creating include/mysql_version.h
config.status: creating plugin/Makefile
config.status: creating win/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
/bin/rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
 
看 INSTALL-SOURCE 有这么一段解决方法:

     * GNU make, available from http://www.gnu.org/software/make/.
       Although some platforms come with their own make
       implementations, it is highly recommended that you use GNU
       make. It may already be available on your system as gmake.
     * autoconf 2.58 (or newer), available from
       http://www.gnu.org/software/autoconf/.
     * automake 1.8.1, available from
       http://www.gnu.org/software/automake/.
     * libtool 1.5, available from
       http://www.gnu.org/software/libtool/.
     * m4, available from http://www.gnu.org/software/m4/.
     * bison, available from http://www.gnu.org/software/bison/. You
       should use the latest version of bison where possible. Version
       1.75 and version 2.1 are known to work. There have been

shell> cd mysql-5.1
    2. Prepare the source tree for configuration.
       Prior to MySQL 5.1.12, you must separately configure the
       InnoDB storage engine. Run the following command from the main
       source directory:
shell> (cd storage/innobase; autoreconf --force --install)
       You can omit the previous command for MySQL 5.1.12 and later,
       or if you do not require InnoDB support.
       Prepare the remainder of the source tree:
shell> autoreconf --force --install
       As an alternative to the preceding autoreconf command, you can
       use BUILD/autorun.sh, which acts as a shortcut for the
       following sequence of commands:
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
       If you get some strange errors during this stage, verify that
       you have the correct version of libtool installed.
 
所以解决方法如下:
 
shell $> apt-get install  autoconf automake libtool
shell $> cd mysql-5.1.41
shell $> autoreconf --force --install
shell $> aclocal
shell $>  libtoolize --automake --force
shell $> automake --force --add-missing
shell $> CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -mstack-align-double -felide-constructors -fno-exceptions -fno-rtti"
shell $> ./configure  --prefix=/usr/local/mysql --with-charset=utf8 --with-collation=utf8_general_ci --enable-thread-safe-client --with-extra-charsets=all --with-client-ldflags=-all-static -with-mysqld-ldflags=-all-static --enable-assembler --with-unix-socket-path=/usr/local/mysql/var/mysql.sock --sysconfdir=/usr/local/mysql/etc  --disable-shared  --without-debug --enable-largefile --with-big-tables --without-uca --with-mysqld-user=mysql --with-pthread --with-pstack --with-plugins=all
 
好了没错误了``问题解决了~