将cmake安装到默认目录
./configure
提示信息:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CURSES_CURSES_H_PATH
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source/CursesDialog/form
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
-- Configuring incomplete, errors occurred!
See also "/home/cg/Downloads/cmake/cmake-2.8.12.1/CMakeFiles/CMakeOutput.log".
See also "/home/cg/Downloads/cmake/cmake-2.8.12.1/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
执行另外的命令来安装cmake:
./bootstrap
提示信息:
-- Found unsuitable Qt version "" from NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CURSES_CURSES_H_PATH
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source/CursesDialog/form
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
used as include directory in directory /home/cg/Downloads/cmake/cmake-2.8.12.1/Source
-- Configuring incomplete, errors occurred!
See also "/home/cg/Downloads/cmake/cmake-2.8.12.1/CMakeFiles/CMakeOutput.log".
See also "/home/cg/Downloads/cmake/cmake-2.8.12.1/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
不能成功从源码安装cmake,下载binary版的试一试,执行命令:
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.1-Linux-i386.tar.gz
将binary包复制到了/usr/lib/cmake/,并且改名为cmake。
运行下面的命令配置环境变量:
$export PATH=/usr/lib/cmake/cmake/bin:$PATH
提示信息:
bash: PATH=/usr/lib/cmake/cmake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/bin:
No such file or directory
输出信息:
bash: --DCMAKE_INSTALL_PREFIX=/home/cg/Apps/LAMP/mysql: No such file or directory
尝试一下来自mysql官网的安装命令:http://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html
groupadd mysql
useradd -r -g mysql mysql
# Beginning of source-build specific instructions #tar zxvf mysql-VERSION.tar.gz
cd
mysql-VERSION
cmake
.
输出信息:
--
Could NOT find Curses (missing: CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:85 (MESSAGE):
Curses library not found. Please install appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.
-- MySQL 5.6.15
-- Packaging as: mysql-5.6.15-Linux-i686
-- HAVE_VISIBILITY_HIDDEN
-- HAVE_VISIBILITY_HIDDEN
-- HAVE_VISIBILITY_HIDDEN
-- Found Curses: /usr/lib/libncurses.so
-- Looking for tputs in /usr/lib/libncurses.so
-- Looking for tputs in /usr/lib/libncurses.so - found
-- Performing Test HAVE_DECL_TGOTO
-- Performing Test HAVE_DECL_TGOTO - Failed
-- Performing Test HAVE_DECL_TGOTO2
-- Performing Test HAVE_DECL_TGOTO2 - Failed
-- Looking for strvis
-- Looking for strvis - not found
-- Looking for strunvis
-- Looking for strunvis - not found
-- Looking for include file libaio.h
-- Looking for include file libaio.h - not found
-- Looking for io_queue_init in aio
-- Looking for io_queue_init in aio - not found
-- Looking for sched_getcpu
-- Looking for sched_getcpu - found
-- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS
-- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS - Success
-- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_64
-- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_64 - Success
-- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC
-- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC - Success
-- Looking for asprintf
-- Looking for asprintf - found
-- Check size of pthread_t
-- Check size of pthread_t - done
-- Using cmake version 2.8.12.1
-- Not building NDB
-- Performing Test HAVE_PEERCRED
-- Performing Test HAVE_PEERCRED - Success
-- Library mysqlclient depends on OSLIBS -lpthread;m;rt;dl
-- Googlemock was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source.
-- If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://foo.bar.com:80
Warning: Bison executable not found in PATH
-- Library mysqlserver depends on OSLIBS -lpthread;m;rt;crypt;dl
-- Configuring done
CMake Warning (dev) in sql/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "mysqld" has an INTERFACE_LINK_LIBRARIES property which differs from
su - mysql
进入mysql的安装目录的scripts目录,执行命令:
./mysql_install_db --basedir=/home/cg/Apps/LAMP/mysql --datadir=/home/cg/Apps/LAMP/mysql
/data/ --user=mysql
输出信息:
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
命令:
./mysql_install_db --basedir=/home/cg/Apps/LAMP/mysql --datadir=/home/cg/Apps/LAMP/mysql
/data/test --user=mysql
(一个很奇怪的问题:直接用命令cd mysql时,输出信息说不存在mysql目录。但是,当我复制ls命令列出来的mysql到cd命令中时,又可已进入mysql。我实在看不出我输入的mysql和复制来的mysql有什么不同)
这一次,我复制ls命令列出来的mysql到上面的命令中,出现了和之前不一样的提示信息:
Installing MySQL system tables...2013-12-15 17:08:13 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-12-15 17:08:13 16519 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!
执行命令:
./mysql_install_db --basedir=/home/cg/Apps/LAMP/mysql --datadir=/home/cg/Apps/LAMP/mysql
/data/test
输出信息:
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
输出信息:
Installing MySQL system tables.../home/cg/Apps/LAMP/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
cmake . -DCMAKE_INSTALL_PREFIX=/home/cg/Apps/LAMP/mysql -DMYSQL_UNIX_ADDR=/etc/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql
make install
scripts/mysql_install_db --basedir=/home/cg/Apps/LAMP/mysql --datadir=/home/cg/Apps/LAMP/mysql
/data/ --user=mysql
输出信息:
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands: