Can't install mysqli on Centos

I am unable to install Mysqli.

I am using Centos 6, apache 2.2.x and php 5.4 MySql 5.5.37-cll

I tried:

yum install php-pdo php-mysqli

      

and I see:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.clouvider.net
 * elrepo: mirrors.coreix.net
 * extras: centos.hyve.com
 * updates: mirrors.coreix.net
Setting up Install Process
No package php-pdo available.
No package php-mysqli available.
Error: Nothing to do

      

I tried:

yum install php-mysqli

      

and I see:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.openitc.uk
 * elrepo: mirrors.coreix.net
 * extras: centos.hyve.com
 * updates: mirrors.coreix.net
Setting up Install Process
No package php-mysqli available.

      

In my php.ini under Dynamic Extensions I don't have a module installed (I guess.) Correct me if I'm wrong. php.ini -> Dynamic Extensions

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;  
; If you wish to have an extension loaded automatically, use the following  
; syntax:  
;  
;   extension=modulename.extension  
;  
; For example, on Windows:  
;  
;   extension=msql.dll  
;  
; ... or under UNIX:  
;  
;   extension=msql.so  
;  
; Note that it should be the name of the module only; no directory information   
; needs to go here.  Specify the location of the extension with the  
; extension_dir directive above.  


;Windows Extensions  
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.  
;  
;extension=php_bz2.dll  
;extension=php_cpdf.dll  
;extension=php_crack.dll  
;extension=php_curl.dll  
;extension=php_db.dll  
;extension=php_dba.dll  
;extension=php_dbase.dll  
;extension=php_dbx.dll  
;extension=php_domxml.dll  
;extension=php_exif.dll  
;extension=php_fdf.dll  
;extension=php_filepro.dll  
;extension=php_gd2.dll  
;extension=php_gettext.dll  
;extension=php_hyperwave.dll  
;extension=php_iconv.dll  
;extension=php_ifx.dll  
;extension=php_iisfunc.dll  
;extension=php_imap.dll  
;extension=php_interbase.dll  
;extension=php_java.dll  
;extension=php_ldap.dll  
;extension=php_mbstring.dll  
;extension=php_mcrypt.dll  
;extension=php_mhash.dll  
;extension=php_mime_magic.dll  
;extension=php_ming.dll  
;extension=php_mssql.dll  
;extension=php_msql.dll  
;extension=php_oci8.dll  
;extension=php_openssl.dll  
;extension=php_oracle.dll  
;extension=php_pdf.dll  
;extension=php_pgsql.dll  
;extension=php_printer.dll  
;extension=php_shmop.dll  
;extension=php_snmp.dll  
;extension=php_sockets.dll  
;extension=php_sybase_ct.dll  
;extension=php_w32api.dll  
;extension=php_xmlrpc.dll  
;extension=php_xslt.dll  
;extension=php_yaz.dll  
;extension=php_zip.dll  

      

By the way, the whole module above is for windows, Should I edit / activate any module for Centos? I need mysql and mysqli connections to the database.


Update

I am rebuilding apache with easyapache and I am checking the mysqli extension. I will post results from this.

+3


source to share


2 answers


From the results you posted above, it does not get installed as it cannot find the php-pdo package in any of the repositories configured on your server. It looks like you made changes to your repos as elrepo

it is not in the version 5 or 6 distributions that I installed.

I would suggest that you first look at the packages available in these repositories as they may be packaged under a different name. Run yum list php*

to see the php packages output. Yum will then inform you what is available, installed, and needs updating.



Note. If you are using a shared host, it is likely that PHP is already installed and mapped to a specific version. Often you will see the version number in the package name, so php can be php4 installed, php5 can be php version 5.2 and below, php53 can be installed in php version 5.3, and yes, I even saw php6 package mapped to php version 5.3. Thus, it is not unusual for a PHP package installed on YOUR server to include a version number in the package name. Really depends on what repositories you have configured to use.

0


source


I know this is old, but for others, make sure your /etc/yum.conf exclude = line is commented out.



+1


source







All Articles