centos6.5编译MySQL报错exec: g++: not found

./configure --prefix=/usr/local/mysql --with-extra-charsets=all  --with-innodb --with-plugins=partition

然后进行make

报如下错误

../depcomp: line 571: exec: g++: not found

make[1]: *** [my_new.o] Error 127

make[1]: Leaving directory `/usr/local/src/mysql-5.1.34/mysys‘

make: *** [all-recursive] Error 1

网上回答是

yum install -y gcc-c++

好吧,安装了这个,这个错是没有报,再执行make

./include/my_global.h:1110: error: redeclaration of C++ built-in type ‘bool’

查询了一下,网友说是没有安装c++,但是我查询了一下,有啊

[[email protected] Packages]# rpm -qa | grep gcc-c++

gcc-c++-4.4.7-11.el6.i686

再看看别的文章,说可以重新./configure试试,好吧,重来吧

[[email protected] Packages]# !145 回车走你

我是虚拟机安装的centos,分配了730M内存,make一下怎么这么久啊,艹留都逛了一圈了,还没完事……

make竟然没有报错,赶紧make install

竟然没有再报错

下一步我们就来进行初始化一下

[[email protected] bin]# ./mysql_install_db

看看/usr/local/mysql生成var这个文件夹,如果有,则说明生成成功

[[email protected] var]# ls

localhost.localdomain.err  mysql  test

[[email protected] var]# pwd

/usr/local/mysql/var

然后再把这个MySQL服务起来一下

我竟然执行了servie mysqld restart ,结果可想而知……

[[email protected] bin]#  ./mysqld_safe --user=mysql &

然后可以验证下有没有跑起来

[[email protected] Packages]# ps -aux | grep ‘mysql‘

Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ

root     31177  0.0  0.1   4356   744 pts/1    S+   00:42   0:00 grep mysql

好,起来了,人品不错嘛,该设置一个密码了

[[email protected] bin]# /usr/local/mysql/bin/mysqladmin password 123456

/usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost‘ failed

error: ‘Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)‘

Check that mysqld is running and that the socket: ‘/tmp/mysql.sock‘ exists!

服务这一块咱是起来了,那么去tmp瞅瞅吧,进去一看,还真是没有

看看日志吧,log里面MySQL开头的只有这一个,应该就是这个吧,打开瞅瞅

less /var/log/mysqld.log.rpmsave

150429 09:56:41 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

进去/var/run,再按table怎么也不出来mysqld……,竟然没有这个文件夹?

那我就创建一个试试

[[email protected] tmp]# mkdir /var/run/mysqld&&touch mysqld.pid&&vim mysqld.pid

我们先把服务加进来

cd /usr/local/mysql/share/mysql

[[email protected] mysql]# cp mysql.server /etc/init.d/mysqld

chkconfig --add mysqld

chkconfig --list mysqld

chkconfig --lerels 35 mysqld on

service mysqld restart

我靠,有报错

[[email protected] mysql]# service mysqld restart

ERROR! MySQL manager or server PID file could not be found!

Starting MySQL. ERROR! Manager of pid-file quit without updating file.

在想起写这个记录前面还遇到两个问题,当时忘了记录……

好像有个什么 redeclaration of C++ built-in type ‘bool’

时间: 2025-01-18 08:54:55

centos6.5编译MySQL报错exec: g++: not found的相关文章

centos6.5安装mysql报错

安装完mysql后,mysql服务无法打开. 报错 查看mysql日志 执行命令:less /var/log/mysqld.log  发现是权限不够,不能创建pid文件.因此改变权限,再次启动服务 问题解决. 原文地址:https://www.cnblogs.com/2016-zck/p/10308253.html

源码编译mysql报错解决

 [[email protected]]# cmake 出现以下错误提示: -- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)CMake Error at cmake/readlineNaNake:82(MESSAGE):  Curses library not found.  Pleaseinstall appropriate package, remove CMakeCache.txt andrerun

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt.

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt. 转载2016-04-25 12:40:44 标签:linuxitphp 解决方法: 1.为系统安装perl-Geo-IP,默认yum源中没有这个包,特意安装epel第三方yum源[[email protected] ~] rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rp

mysql报错:Access denied for user 'root'@'localhost' 的一次解决办法

Centos6.5 X64,Mysql 5.6.20 X64 均是64位 顺便记录一下,方便后来人. 1.java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 确认用户名.密码是正确的. select * from mysql.user;之后,发现 没有localhost用户 可以复制一行 127.0.0.1的记录,然后再次修改密码 mysql> UPDATE user SET

长久不用的mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

mac上安装过mysql: 然而,尝试连接时报错: $ mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 尝试去查看mysql.socket文件,发现没有.. $ which mysql /usr/local/bin/mysql 然后试试重启mysql: $ mysql.server start

centos6.4安装openssl报错out range of signed 32bit displacement

一.系统环境 操作系统:centos6.4 x86_64 openssl版本:openssl-0.9.8e 二.安装过程 # tar zxvf openssl-0.9.8e.tar.gz # cd openssl-0.9.8e # ./config shared zlib # make 报错: md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement md5-x86_64.s:50: Error: 0xe8

安装编译qemu-kvm报错Make sure to have the zlib libs and headers installed.

[[email protected] qemu-kvm.git]# ./configure Error: zlib check failed Make sure to have the zlib libs and headers installed. 解决上面报错需要安装zlib相关的软件 [[email protected] qemu-kvm.git]# yum install zlib* 安装完上面软件后继续出现下面报错 [[email protected] qemu-kvm.git]# .

Mac brew 安装mysql 报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket

安装mysql 最新版 56 brew install mysql 启动报错 ben:~ soul$ which mysql /usr/local/bin/mysql ben:~ soul$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 解决办法 运行 ben:~ soul$ mysql.server start Starting MySQL .

MySQL 报错 Last_SQL_Errno: 1032

MySQL 报错 Last_SQL_Errno: 1032 show slave status \G Last_SQL_Errno: 1032 Last_SQL_Error: Could not execute Update_rows event on table 35lq_db.dr_planstats_h; Can't find record in 'dr_planstats_h', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;