라이브 서버에 PHP5용 CLI 추가

라이브 서버에 PHP5용 CLI 추가

내 서버에 PHP5에 대한 명령줄 지원을 추가하고 싶습니다. 실행하면 aptitude install php5-cliPHP 모듈/패키지에 충족되지 않은 종속성이 있다는 메시지가 나타납니다.

다음은 이러한 "충족되지 않은 종속성"과 요구 사항 및 업그레이드로 인해 어려움을 겪는 패키지 목록입니다.

  • php5-gd
  • php5 컬
  • php5-mysql
  • php5-cgi

그들은 모두 php5-common에 의존합니다.

라이브 사이트를 중단하지 않고 적성이 제안하는 대로 패키지를 업그레이드할 수 있습니까?

적성의 출력

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initialising package states... Done
The following packages are BROKEN:
  libapache2-mod-php5 php5-cgi php5-curl php5-gd php5-mysql 
The following NEW packages will be installed:
  php5-cli 
The following packages will be upgraded:
  php5-common 
1 packages upgraded, 1 newly installed, 0 to remove and 123 not upgraded.
Need to get 3,511kB of archives. After unpacking 7,803kB will be used.
The following packages have unmet dependencies:
  php5-gd: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  php5-curl: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  php5-mysql: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  php5-cgi: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  libapache2-mod-php5: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
The following actions will resolve these dependencies:

Upgrade the following packages:
libapache2-mod-php5 [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-cgi [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-curl [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-gd [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-mysql [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]

Score is 340

답변1

내 대답은아마도! ;-)

PHP 5.3.3 ~ 5.3.5는 중요하지 않습니다. 즉, 우분투/데비안이 뭔가 미친 짓을 하지 않는 이상 말이죠. 그러나 포인트 릴리스(예: 5.3.x에서 5.3.y)는 기능 세트를 중단해서는 안 됩니다.

즉, 당신이 미친 해킹을 하지 않았으면 좋겠고, 예를 들어 5.3.5에서 수정된 5.3.3의 버그에 의존하여 회귀가 발생했을 것입니다. 이를 테스트하는 가장 쉬운 방법은 테스트 VM을 가동하고 사이트가 작동하는지 확인하는 것입니다(또는 더 나은 방법: 테스트 도구 모음이 실행됨).

또 다른 비결은 5.3.3을 설치하는 것입니다. 여기에 아이디어가 있습니다(제 버전은 다릅니다).

# apt-cache showpkg php5-cli
Package: php5-cli
Versions: 
5.2.10.dfsg.1-2ubuntu6.10
...

(출력을 잘랐습니다.)

그런 다음 다음을 사용하여 설치하십시오.

# apt-get install php5-cli=5.2.10.dfsg.1-2ubuntu6.10
...

HTH

답변2

Nginx PPA를 사용하고 있으며 Aptitude는 최신 버전에 대한 패키지 업데이트를 시도합니다. Ubuntu 저장소에서 php5-cli를 설치하려면 aptitude install php5-cli=5.3.3-1ubuntu12~lucid.

관련 정보