php5-mysqlまたはphp5-mysqlndをインストールできません

php5-mysqlまたはphp5-mysqlndをインストールできません

私はdockerコンテナでDebian Jessieを使用していますdocker run --entrypoint /bin/bash -i -t php:5-apache。残念ながら、php5-mysqlやphp5-mysqlndをインストールすることはできません。私は次の手順を実行しました。

apt-get update

Hit http://security.debian.org jessie/updates InRelease
Get:1 http://security.debian.org jessie/updates/main amd64 Packages [641 kB]
Ign http://deb.debian.org jessie InRelease                                 
Hit http://deb.debian.org jessie-updates InRelease                         
Hit http://deb.debian.org jessie Release.gpg                                                                                                 
Get:2 http://deb.debian.org jessie-updates/main amd64 Packages [23.1 kB]                                                                     
Hit http://deb.debian.org jessie Release                                                                                                     
Get:3 http://deb.debian.org jessie/main amd64 Packages [9064 kB]                                                                             
Fetched 9728 kB in 45s (215 kB/s)                                                                                                            
Reading package lists... Done

apt-get install php5-mysql

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-mysql is a virtual package provided by:
  php5-mysqlnd 5.6.33+dfsg-0+deb8u1 [Not candidate version]
  php5-mysqlnd 5.6.30+dfsg-0+deb8u1 [Not candidate version]

E: Package 'php5-mysql' has no installation candidate

apt-get install php5-mysqlnd

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-mysqlnd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  php5-mysql

E: Package 'php5-mysqlnd' has no installation candidate

私が逃したものは何ですか?

ミガル

ベストアンサー1

使用する場合Docker PHP5-apache イメージ、説明されている動作は、APTプリファレンスファイル/etc/apt/preferences.d/no-debian-phpによって発生する可能性があります。これはAPTがPHP関連パッケージを考慮するのを妨げるようです。

使用しているドッカーイメージはPHPを構築するためのソースコードを提供しますが、APT PHPパッケージはここでは役に立ちません。 DockerイメージにインストールされているPHPに拡張機能を追加する必要がある場合は、説明に従ってヘルパースクリプトを使用してソースからビルドする必要があります。ドキュメントから

おすすめ記事