# [solved] Cannot emerge php, mysql configure failed

## torbjornlu

Hi,

I've recently installed mysql and it works but when I now try to install php I get the followin error:

```
checking for MySQL UNIX socket location... /var/run/mysqld/mysqld.sock

checking for mysql_close in -lmysqlclient... no

checking for mysql_error in -lmysqlclient... no

configure: error: mysql configure failed. Please check config.log for more information.

!!! ERROR: dev-lang/php-5.1.6-r6 failed.

Call stack:

  ebuild.sh, line 1539:   Called dyn_compile

  ebuild.sh, line 939:   Called src_compile

  php-5.1.6-r6.ebuild, line 173:   Called src_compile_normal

  php-5.1.6-r6.ebuild, line 323:   Called php5_1-sapi_src_compile

  php5_1-sapi.eclass, line 576:   Called die
```

config.log did not give me any more info.

Any ideas? 

Thanks

/TorbjörnLast edited by torbjornlu on Wed Feb 28, 2007 7:31 pm; edited 1 time in total

----------

## SLBMEH

what are your use flags in /etc/make.conf and your package specific use flags for mysql and php in /etc/package.use

also what profile are you using

```
ls -l /etc/make.profile
```

----------

## torbjornlu

/etc/make.conf

```
USE=" fastcgi perl php python ruby apache2 -X alsa -arts avi -berkdb -bitmap-fonts -cairo -cdr cd

rom cli crypt -cups -dbus -dlloader -dri dvb dvbplayer dvd -dvdr dxr3 dxr3-audio-denoise eds elib

c_glibc emacs -emboss encode esd fam ffmpeg -firefox -fortran ftp gdbm -gif gmail -gnome gpm gstr

eamer -gtk hal input_devices_evdev input_devices_keyboard input_devices_mouse -ipv6 -isdnlog jpeg

 -kde kernel_linux ldap libg++ lirc mad mikmod mp3 mpeg msql mysql ncurses net nfs nls nptl nptlo

nly ntfs ogg -opengl oss -pam pcre pdflib perl php png -ppds -pppd python -qt3 -qt4 -quicktime re

adline reflection rsh ruby sdl se_swedb sendmail session sockets spell spl -sql ssl tcpd -truetyp

e -truetype-fonts tv_check tv_pick_cgi -type1-fonts udev unicode userland_GNU v4l v4l2 vdr vorbis

 win32codecs x86 xml -xorg -xv zlib"
```

/etc/portage/package.use

```
dev-ruby/rails mysql fastcgi
```

profile:

```
lrwxrwxrwx 1 root root 48 Jan  2 21:45 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2006.1
```

Hope that will clarify

----------

## SLBMEH

hmm... try 

```
emerge -uDv mysql
```

and then make sure it's initialized and then try to reemerge php.

----------

## torbjornlu

I tried that, a lot was updated but then the same error appeared when emerging php.

But what do you mean with "make sure it's initialized"? I have a database up an running in mysql but do I need to do more?

Regards

----------

## nixnut

Moved from Installing Gentoo to Networking & Security.

Not about getting gentoo installed, so moved here.

----------

## Sen

Try to remove msql from your use flags in the beginning mysql emerge says that the use flag msql has support for software not in portage yet.

it dit the trick for me so  :Smile: 

----------

## torbjornlu

That did it! Thanks a lot!

So dont use both msql and mysql in your USE-variable when installing php.

/Torbjörn   :Very Happy: 

----------

## kunitoki

i had the same problem. i think that having enabled "msql" and "mysql" when compiling PHP should produce a notice for the user.

asking for a gentoo dev to update the php ebuild...

----------

