PHP 5.5を使用してDebian 7にphp5-memcachedをインストールする方法は?

PHP 5.5を使用してDebian 7にphp5-memcachedをインストールする方法は?

Debian 7 VirtualBox VM に PHP 5 Memcached モジュールをインストールしようとして失敗しました。

root@testvm:~# apt-get install php5-memcached
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-memcached : Depends: libmemcached11 but it is not installable
E: Unable to correct problems, you have held broken packages.

Synaptic Package Managerを介してもインストールできません。

私の考えでは、ソース情報が不足しているのが問題のようです/etc/apt/sources.list


修正する:

/etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130615-23:04]/ wheezy main

# deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130615-23:04]/ wheezy main

deb http://ftp.de.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.de.debian.org/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# wheezy-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free

# nginx
deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all

# PHP 5.5
deb http://packages.dotdeb.org wheezy-php55 all
deb-src http://packages.dotdeb.org wheezy-php55 all

修正する:

欠落している依存関係を手動でインストールしようとしましたが、機能しませんでした。

root@devvm:~# apt-get install libmemcached11
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmemcached11 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

E: Package 'libmemcached11' has no installation candidate

修正する:

root@devvm:~# apt-cache depends php5-memcached libmemcached10
php5-memcached
  Depends: libc6
  Depends: <libmemcached11>
  Depends: zlib1g
  Depends: <phpapi-20121212>
    libapache2-mod-php5filter
    libapache2-mod-php5
    libphp5-embed
    php5-cgi
    php5-cli
    php5-fpm
  Depends: php5-common
 |PreDepends: dpkg
  PreDepends: <dpkg-maintscript-helper>
libmemcached10
  Depends: libc6
  Depends: libgcc1
  Depends: libstdc++6
  PreDepends: multiarch-support
  Conflicts: <libmemcached2>
  Conflicts: <libmemcached3>
  Conflicts: <libmemcached6>
  Conflicts: <libmemcached9>

ベストアンサー1

問題を解決するには、source.listに以下を追加するだけです。

# Wheezy
deb http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ wheezy all
deb-src http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ wheezy all

# Wheezy-php55
deb http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ wheezy-php55 all
deb-src http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ wheezy-php55 all

実際、欠落している依存関係(libmemcached11)が次の場所に存在します。ゆるい分布ドットデップリポジトリ。

おすすめ記事