PDO PHPモジュールをインストールすると「Cコンパイルされたプログラムを実行できません」エラー

PDO PHPモジュールをインストールすると「Cコンパイルされたプログラムを実行できません」エラー

いくつかのパッケージをインストールしたいcPanelサーバーがあります。サーバーにルートとして接続し、次のコマンドを実行して既存のリポジトリをすべて更新して削除しました。

yum update
yum clean all
rm -f /etc/yum.repos.d/*
rm -rf /var/cache/yum/*

私の最後のコマンドはPDO PHPモジュールをインストールすることでしたが、この時点でエラーが発生しました。

root@linux [~/TMP]# pecl install pdo
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/PDO-1.0.3
running: /root/tmp/pear/PDO/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/var/tmp/pear-build-root/PDO-1.0.3':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/PDO/configure' failed
root@linux [~/TMP]# pecl install bdoNo releases available for package "pecl.php.net/bdo"
install failed

このエラーの原因は何ですか?どうすれば解決できますか?


編集する:また、実行時に依存yum install php*関係を確認した後、次のようになります。

--> Finished Dependency Resolution
Error: Package: rrdtool-php-1.3.8-6.el6.x86_64 (base)
           Requires: php(zend-abi) = 20090626

編集する:私がアップロードしました構成ログそして構成状態文書

ベストアンサー1

コンパイルに必要な開発ツールを含むソフトウェアパッケージをインストールする必要があります。 1つずつインストールできます。

yum install gcc
yum install make
...
yum install glibc-devel

または1つのコマンドで複数のものをインストールできます。

yum groupinstall "Development Tools"

おすすめ記事