CentOS7 не может установить расширение pdo_mysql

#centos7

#centos7

Вопрос:

Я новичок в администрировании сервера, у меня есть выделенный сервер в CentOS 7. Я пытаюсь включить расширение pdo_mysql, и моя версия php равна 7.2

У меня есть php версии 7.1 и 7.0, но там он установлен и работает должным образом, но когда я пытаюсь установить pdo_mysql в моем CentOS 7

 yum install php-devel php-pear mysql-devel httpd-devel
pecl install pdo

  

Но когда я запускаю эту команду, я получаю сообщение об ошибке типа :

 executing libtool commands
running: make
/bin/sh /root/tmp/pear/pear-build-rootfJoHUo/PDO-1.0.3/libtool --mode=compile cc  -I. -I/root/tmp/pear/PDO -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootfJoHUo/PDO-1.0.3/include -I/root/tmp/pear/pear-build-rootfJoHUo/PDO-1.0.3/main -I/root/tmp/pear/PDO -I/opt/cpanel/ea-php72/root/usr/include/php -I/opt/cpanel/ea-php72/root/usr/include/php/main -I/opt/cpanel/ea-php72/root/usr/include/php/TSRM -I/opt/cpanel/ea-php72/root/usr/include/php/Zend -I/opt/cpanel/ea-php72/root/usr/include/php/ext -I/opt/cpanel/ea-php72/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/PDO/pdo.c -o pdo.lo
libtool: compile:  cc -I. -I/root/tmp/pear/PDO -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootfJoHUo/PDO-1.0.3/include -I/root/tmp/pear/pear-build-rootfJoHUo/PDO-1.0.3/main -I/root/tmp/pear/PDO -I/opt/cpanel/ea-php72/root/usr/include/php -I/opt/cpanel/ea-php72/root/usr/include/php/main -I/opt/cpanel/ea-php72/root/usr/include/php/TSRM -I/opt/cpanel/ea-php72/root/usr/include/php/Zend -I/opt/cpanel/ea-php72/root/usr/include/php/ext -I/opt/cpanel/ea-php72/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/PDO/pdo.c  -fPIC -DPIC -o .libs/pdo.o
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h: In function 'pdo_attr_lval':
/root/tmp/pear/PDO/php_pdo_driver.h:191:2: error: too many arguments to function 'zend_hash_index_find'
  if (options amp;amp; SUCCESS == zend_hash_index_find(Z_ARRVAL_P(options), option_name, (void**)amp;v)) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:170:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
                              ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h:192:3: warning: passing argument 1 of 'zval_get_type' from incompatible pointer type [enabled by default]
   convert_to_long_ex(v);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:29:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_types.h:389:38: note: expected 'const struct zval *' but argument is of type 'struct zval **'
 static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
                                      ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h:192:3: warning: passing argument 1 of 'convert_to_long' from incompatible pointer type [enabled by default]
   convert_to_long_ex(v);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:328:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_operators.h:251:29: note: expected 'struct zval *' but argument is of type 'struct zval **'
 ZEND_API void ZEND_FASTCALL convert_to_long(zval *op);
                             ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h: In function 'pdo_attr_strval':
/root/tmp/pear/PDO/php_pdo_driver.h:201:2: error: too many arguments to function 'zend_hash_index_find'
  if (options amp;amp; SUCCESS == zend_hash_index_find(Z_ARRVAL_P(options), option_name, (void**)amp;v)) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:170:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
                              ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h:202:3: warning: passing argument 1 of 'zval_get_type' from incompatible pointer type [enabled by default]
   convert_to_string_ex(v);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:29:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_types.h:389:38: note: expected 'const struct zval *' but argument is of type 'struct zval **'
 static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
                                      ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h:202:3: warning: passing argument 1 of 'zval_get_type' from incompatible pointer type [enabled by default]
   convert_to_string_ex(v);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:29:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_types.h:389:38: note: expected 'const struct zval *' but argument is of type 'struct zval **'
 static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
                                      ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h:202:3: warning: passing argument 1 of '_convert_to_string' from incompatible pointer type [enabled by default]
   convert_to_string_ex(v);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:328:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_operators.h:250:29: note: expected 'struct zval *' but argument is of type 'struct zval **'
 ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op ZEND_FILE_LINE_DC);
                             ^
In file included from /root/tmp/pear/PDO/pdo.c:32:0:
/root/tmp/pear/PDO/php_pdo_driver.h:203:3: warning: passing argument 1 of '_estrndup' makes pointer from integer without a cast [enabled by default]
   return estrndup(Z_STRVAL_PP(v), Z_STRLEN_PP(v));
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:31:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_alloc.h:85:31: note: expected 'const char *' but argument is of type 'int'
 ZEND_API char*  ZEND_FASTCALL _estrndup(const char *s, size_t length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
                               ^
In file included from /root/tmp/pear/PDO/pdo.c:33:0:
/root/tmp/pear/PDO/php_pdo_int.h: At top level:
/root/tmp/pear/PDO/php_pdo_int.h:34:1: error: unknown type name 'zend_object_value'
 extern zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC);
 ^
/root/tmp/pear/PDO/php_pdo_int.h:39:1: error: unknown type name 'zend_object_value'
 extern zend_object_value pdo_dbstmt_new(zend_class_entry *ce TSRMLS_DC);
 ^
/root/tmp/pear/PDO/php_pdo_int.h:48:1: error: unknown type name 'zend_object_value'
 extern zend_object_value pdo_row_new(zend_class_entry *ce TSRMLS_DC);
 ^
/root/tmp/pear/PDO/pdo.c: In function 'php_pdo_get_exception_base':
/root/tmp/pear/PDO/pdo.c:68:4: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type [enabled by default]
    if (zend_hash_find(CG(class_table), "runtimeexception", sizeof("RuntimeException"), (void **) amp;pce) == SUCCESS) {
    ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:168:30: note: expected 'struct zend_string *' but argument is of type 'char *'
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/root/tmp/pear/PDO/pdo.c:68:4: error: too many arguments to function 'zend_hash_find'
    if (zend_hash_find(CG(class_table), "runtimeexception", sizeof("RuntimeException"), (void **) amp;pce) == SUCCESS) {
    ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:168:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/root/tmp/pear/PDO/pdo.c: In function 'zif_pdo_drivers':
/root/tmp/pear/PDO/pdo.c:96:2: warning: passing argument 2 of 'zend_hash_get_current_data_ex' from incompatible pointer type [enabled by default]
  while (SUCCESS == zend_hash_get_current_data_ex(amp;pdo_driver_hash, (void**)amp;pdriver, amp;pos)) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:205:30: note: expected 'HashPosition *' but argument is of type 'void **'
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
                              ^
/root/tmp/pear/PDO/pdo.c:96:2: error: too many arguments to function 'zend_hash_get_current_data_ex'
  while (SUCCESS == zend_hash_get_current_data_ex(amp;pdo_driver_hash, (void**)amp;pdriver, amp;pos)) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:205:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
                              ^
/root/tmp/pear/PDO/pdo.c:97:3: error: too many arguments to function 'add_next_index_stringl'
   add_next_index_stringl(return_value, (char*)(*pdriver)->driver_name, (*pdriver)->driver_name_len, 1);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:39:0,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_API.h:451:14: note: declared here
 ZEND_API int add_next_index_stringl(zval *arg, const char *str, size_t length);
              ^
/root/tmp/pear/PDO/pdo.c: In function 'php_pdo_register_driver':
/root/tmp/pear/PDO/pdo.c:165:2: warning: passing argument 2 of 'zend_hash_exists' from incompatible pointer type [enabled by default]
  if (!zend_hash_exists(amp;module_registry, "pdo", sizeof("pdo"))) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:193:34: note: expected 'struct zend_string *' but argument is of type 'char *'
 ZEND_API zend_bool ZEND_FASTCALL zend_hash_exists(const HashTable *ht, zend_string *key);
                                  ^
/root/tmp/pear/PDO/pdo.c:165:2: error: too many arguments to function 'zend_hash_exists'
  if (!zend_hash_exists(amp;module_registry, "pdo", sizeof("pdo"))) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:193:34: note: declared here
 ZEND_API zend_bool ZEND_FASTCALL zend_hash_exists(const HashTable *ht, zend_string *key);
                                  ^
/root/tmp/pear/PDO/pdo.c:171:41: error: macro "zend_hash_add" passed 6 arguments, but takes just 3
    (void**)amp;driver, sizeof(driver), NULL);
                                         ^
/root/tmp/pear/PDO/pdo.c:170:9: error: 'zend_hash_add' undeclared (first use in this function)
  return zend_hash_add(amp;pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len,
         ^
/root/tmp/pear/PDO/pdo.c:170:9: note: each undeclared identifier is reported only once for each function it appears in
/root/tmp/pear/PDO/pdo.c: In function 'php_pdo_unregister_driver':
/root/tmp/pear/PDO/pdo.c:176:2: warning: passing argument 2 of 'zend_hash_exists' from incompatible pointer type [enabled by default]
  if (!zend_hash_exists(amp;module_registry, "pdo", sizeof("pdo"))) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:193:34: note: expected 'struct zend_string *' but argument is of type 'char *'
 ZEND_API zend_bool ZEND_FASTCALL zend_hash_exists(const HashTable *ht, zend_string *key);
                                  ^
/root/tmp/pear/PDO/pdo.c:176:2: error: too many arguments to function 'zend_hash_exists'
  if (!zend_hash_exists(amp;module_registry, "pdo", sizeof("pdo"))) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:193:34: note: declared here
 ZEND_API zend_bool ZEND_FASTCALL zend_hash_exists(const HashTable *ht, zend_string *key);
                                  ^
/root/tmp/pear/PDO/pdo.c:180:2: warning: passing argument 2 of 'zend_hash_del' from incompatible pointer type [enabled by default]
  zend_hash_del(amp;pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len);
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:160:28: note: expected 'struct zend_string *' but argument is of type 'char *'
 ZEND_API int ZEND_FASTCALL zend_hash_del(HashTable *ht, zend_string *key);
                            ^
/root/tmp/pear/PDO/pdo.c:180:2: error: too many arguments to function 'zend_hash_del'
  zend_hash_del(amp;pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len);
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:160:28: note: declared here
 ZEND_API int ZEND_FASTCALL zend_hash_del(HashTable *ht, zend_string *key);
                            ^
/root/tmp/pear/PDO/pdo.c: In function 'pdo_find_driver':
/root/tmp/pear/PDO/pdo.c:187:2: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type [enabled by default]
  zend_hash_find(amp;pdo_driver_hash, (char*)name, namelen, (void**)amp;driver);
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:168:30: note: expected 'struct zend_string *' but argument is of type 'char *'
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/root/tmp/pear/PDO/pdo.c:187:2: error: too many arguments to function 'zend_hash_find'
  zend_hash_find(amp;pdo_driver_hash, (char*)name, namelen, (void**)amp;driver);
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:168:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/root/tmp/pear/PDO/pdo.c: In function 'zm_startup_pdo':
/root/tmp/pear/PDO/pdo.c:323:3: error: too many arguments to function 'zend_register_internal_class_ex'
   pdo_exception_ce = zend_register_internal_class_ex(amp;ce, php_pdo_get_exception_base(0 TSRMLS_CC), NULL TSRMLS_CC);
   ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:39:0,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_API.h:303:28: note: declared here
 ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce);
                            ^
/root/tmp/pear/PDO/pdo.c: In function 'zm_info_pdo':
/root/tmp/pear/PDO/pdo.c:371:2: warning: passing argument 2 of 'zend_hash_get_current_data_ex' from incompatible pointer type [enabled by default]
  while (SUCCESS == zend_hash_get_current_data_ex(amp;pdo_driver_hash, (void**)amp;pdriver, amp;pos)) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:205:30: note: expected 'HashPosition *' but argument is of type 'void **'
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
                              ^
/root/tmp/pear/PDO/pdo.c:371:2: error: too many arguments to function 'zend_hash_get_current_data_ex'
  while (SUCCESS == zend_hash_get_current_data_ex(amp;pdo_driver_hash, (void**)amp;pdriver, amp;pos)) {
  ^
In file included from /opt/cpanel/ea-php72/root/usr/include/php/Zend/zend.h:34:0,
                 from /opt/cpanel/ea-php72/root/usr/include/php/main/php.h:35,
                 from /root/tmp/pear/PDO/pdo.c:28:
/opt/cpanel/ea-php72/root/usr/include/php/Zend/zend_hash.h:205:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
                              ^
make: *** [pdo.lo] Error 1
ERROR: `make' failed


  

Любой может, пожалуйста, спасти мою жизнь 🙂