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)이 다음 위치에 존재합니다.헐떡거림분포도트 뎁저장소.

답변2

릴리스 태그를 사용해 보세요

귀하의 저장소는 Debian이 아니므로 패키지를 원하는 위치에서 apt-get을 지정합시다. 다음을 사용해 보세요:

sudo apt-get -t stable install php5-memcached

php5-memcached이렇게 하면 안정적인 저장소에서 설치 되므로 종속성 문제가 해결됩니다 .libmemcached10

고정된 방법

apt-get -t stabledotdeb.org는 패키지의 최신 안정 버전이므로 미러링을 비활성화한 다음 apt-get update패키지를 설치하거나 고정 마법을 사용하십시오. 다음 내용으로 파일을 만듭니다 /etc/apt/preferences.d/aptpinning.

Package: php5-memcached
Pin: origin "ftp.de.debian.org"
Pin-Priority: 990

Package: php5-memcached
Pin: origin "packages.dotdeb.org"
Pin-Priority: 500

ftp.de.debian.org이렇게 하면 의 패킷보다 우선 순위가 높은 패킷이 제공됩니다 packages.dotdeb.org.

다시,혼합 저장소는 나쁜 생각입니다., 이런 일이 일어날 수 있고 일어났기 때문입니다. 매우 중요한 일이 아닌 한, 종속성을 깨뜨릴 수 있는 리포지토리를 혼합해서는 안 됩니다.

어쩌면 저장소를 백포트해야 할 수도 있습니다.

다른 소스의 PHP를 사용하는 이유가 "보안"이라면 wheezy-backport 저장소를 사용하는 것이 더 좋습니다. deb http://YOURMIRROR.debian.org/debian wheezy-backports main에 추가하고 sources.list, 실행 apt-get update하고, 패키지를 설치하기 만 하면 됩니다 apt-get -t wheezy-backports install "package". 이 방법을 시도하는 경우 다른 방법을 사용하여 변경한 내용을 되돌리세요.

답변3

당신이 가지고 있는지 확인하십시오

deb http://packages.dotdeb.org wheezy all

귀하의 소스에! 바라보다데비안 7.0 "Wheezy"용 PHP 5.5.6. 나를 위해 작동합니다.

답변4

이미 설치했습니다. 어떻게든...

을 설치하려고 합니다 libmemcached11. 설치가 apt-get작동하지 않았기 때문에 소스에서 설치했습니다.

root@devvm:~# wget http://ftp.de.debian.org/debian/pool/main/libm/libmemcached/libmemcached11_1.0.17-2_amd64.deb
...
2013-07-23 22:07:02 (713 KB/s) - `libmemcached11_1.0.17-2_amd64.deb' saved [112238/112238]

root@devvm:~# dpkg --install libmemcached11_1.0.17-2_amd64.deb 
Selecting previously unselected package libmemcached11:amd64.
(Reading database ... 149070 files and directories currently installed.)
Unpacking libmemcached11:amd64 (from libmemcached11_1.0.17-2_amd64.deb) ...
dpkg: dependency problems prevent configuration of libmemcached11:amd64:
 libmemcached11:amd64 depends on libc6 (>= 2.16); however:
  Version of libc6:amd64 on system is 2.13-38.

dpkg: error processing libmemcached11:amd64 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libmemcached11:amd64

보시다시피 오류가 있습니다. 하지만 이제 libmemcached11설치되었습니다.

설치가 실패했다고 생각했기 때문에 먼저 다운로드한(손상된?) 패키지를 삭제하기로 결정했지만 함께 설치하려고 프로세스를 중단했습니다 php5-memcached(어쩌면 어떻게든 작동할 수도... ...):

root@devvm:~# apt-get remove libmemcached11
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
...
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libmemcached11
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 261 kB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.

그런 다음 설치를 다시 시도했습니다 php5-memcached. 이번에는 작동했습니다.

root@devvm:~# apt-get -t stable install php5-memcached
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
...
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libmemcached11
The following NEW packages will be installed:
  libmemcached11 php5-memcached
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 148 kB of archives.
After this operation, 397 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://packages.dotdeb.org/ wheezy/all libmemcached11 amd64 1.0.16-1 [113 kB]
Get:2 http://packages.dotdeb.org/ wheezy-php55/all php5-memcached amd64 5.5.0-1~dotdeb.1 [34.9 kB]
Fetched 148 kB in 0s (328 kB/s)      
Selecting previously unselected package libmemcached11:amd64.
(Reading database ... 149070 files and directories currently installed.)
Unpacking libmemcached11:amd64 (from .../libmemcached11_1.0.16-1_amd64.deb) ...
Selecting previously unselected package php5-memcached.
Unpacking php5-memcached (from .../php5-memcached_5.5.0-1~dotdeb.1_amd64.deb) ...
Processing triggers for php5-fpm ...
[ ok ] Restarting PHP5 FastCGI Process Manager: php5-fpm.
Setting up libmemcached11:amd64 (1.0.16-1) ...
Setting up php5-memcached (5.5.0-1~dotdeb.1) ...

Creating config file /etc/php5/mods-available/memcached.ini with new version
Processing triggers for php5-fpm ...
[ ok ] Restarting PHP5 FastCGI Process Manager: php5-fpm.

관련 정보