Mysql Build Issues
Hi there!!! Since you have arrived at this page we assume you are having the mission of building mysql from source (for any reason whatever) . Did you start the build process??? Did you come across a horde of errors (I had plenty of those initially)??? Well, do not worry we have gone through this a number of times and here is a list of errors that we found in our experience with installing from source on Windows as well as Ubuntu. We actually came across a lot more errors than what is printed on this page. However, we could only capture the errors given below.
In case you are installing mysql from source on Windows or Ubuntu then do contact us at abdullah.ak2002@gmail.com or taufiq.mysql@gmail.comĀ . We are confident that we will be able to help you and we will update your errors and their solutions on this page.
Windows
- Use this link,http://forge.mysql.com/wiki/
Building_MySQL_on_Windows as a guide. The most authentic and easy way to getting started on Windows. Should not be a problem at all (though we did have a few but that was before we used this tutorial).
Ubuntu 8.04 (Hardy Heron)
- First off install m4,autoconf,automake,libtool & [bison]
- Easy way open Synaptic Manager by clicking on System->Administration->Synaptic Package Manager.
- Press Ctrl+f and type in m4 . Click on m4 and mark for installation if not already marked.
- Repeat the same procedure as above for autoconf, automake, libtool. If you are going to run a debugger,then bison, gdb and ddd also.
- Now click on Apply on Synaptic (you need to have an internet connection).
- Or the hard way (IMHO)
- First download all the packages you need from GNU at
http://mirrors.usc.edu/pub/gnu/ - cd to the downloaded directory on the terminal.
- Now, following commands are to be entered :
- $ tar -xzvf m4-1.4.11.tar.gz
- $ cd m4-1.4.11
- $ sudo ./configure -prefix=/usr
- Error obtained
- checking for C compiler default output file name configure: error: C compiler cannot create executables
- Reason
- cc is not gcc (v4.2.3)
Also some libraries have not been installed - Solution
- $cc=gcc
Install g++ (v4.2.3 — latest) & it’s dependencies from Synaptic
- Error obtained
- $ sudo make
- $ sudo make install
- Installation of autoconf,automake,libtool and bison are similar
- First download all the packages you need from GNU at
- Easy way open Synaptic Manager by clicking on System->Administration->Synaptic Package Manager.
- Following steps are taken from http://forge.mysql.com/wiki/MySQL_Internals_Guided_Tour
- cd mysql-version (cd into the source you want to install)
- sudo BUILD/compile-pentium-debug –prefix=$HOME/bin-mysql-5.1
- Error obtained
- checking for termcap functions library… configure: error: No curses/termcap library found
- Reason
- No curses/termcap library –
- curses and termcap provide textual user interfaces in a terminal-independent manner.
You have to have either ncurses or termcap installed for installing mysql.
- Check http://en.wikipedia.org/wiki/Ncurses
for further details.
- No curses/termcap library –
- Solution
- Install libncurses5-dev from Synaptic
Repeat Step 2.
- Error obtained
- sudo make
- Error obtained
- checking how to run the C++ preprocessor… /lib/cpp
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details.
make: *** [config.status] Error 1 - Reason
- cpp not installed
- Solution
- Install latest g++(currently 4.2.3) using Synaptic manager
- Error obtained
- sudo make install
- $HOME/bin-mysql-5.1/bin/mysql_install_db\
–basedir=$HOME/mysql-bin \
–datadir=$HOME/mysql-bin/var- Error obtained
- mkdir: cannot create directory `/home/[user_name]/mysql-bin/var’: Permission denied
chmod: cannot access `/home/[user_name]/mysql-bin/var’: No such file or directory
…
…
Installation of system tables failed! Examine the logs in
/home/[user_name]/mysql-bin/var for more information.
…
…
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /home/[user_name]/mysql-bin/scripts/mysqlbug script!
- Reason
- Problem with Access and modification privileges
- Be careful with the access priviliges … It is very tricky & dangerous
- For instance, if the bin directory lies inside some user’s home directory then the owner of
the mysql-bin dir must be that user only and no one else.
- For instance, if the bin directory lies inside some user’s home directory then the owner of
- Solution
- simplest way (if mysql-bin lies in /home/user_x)
- $cd /home/user_x
- $sudo chown -R [user_x] $HOME/mysql-bin
- simplest way (if mysql-bin lies in /home/user_x)
- Error obtained
- Congratulations !!! If you have reached this step successfully then you will be having an executable mysql directory on your computer.
For a comprehensive tutorial,please go through
http://forge.mysql.com/wiki/MySQL_Internals_Guided_Tour .If you get any errors then mail me at abdullah.ak2002@gmail.com or taufiq.mysql@gmail.com .
Important Hints :
- If you install any package after $./configure then do $make clean and then $./configure again
Comments»
No comments yet — be the first.