Debian Wheezy: apache2 재설치

Debian Wheezy: apache2 재설치

내 데비안 서버의 apache2 패키지가 손상되었으므로 먼저 모든 apache2 관련 패키지를 제거했습니다. 이제 모든 것이 올바르게 제거된 것 같습니다.

dpkg -l | grep 'apache'아무것도 반환하지 않음

그런데 apache2가 설치가 안되네요...

그리고 apt-get:

sudo apt-get install apache2
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:
 apache2 : Depends: apache2-mpm-worker (= 2.2.22-13+deb7u6) but it is not going to be installed or
                    apache2-mpm-prefork (= 2.2.22-13+deb7u6) but it is not going to be installed or
                    apache2-mpm-event (= 2.2.22-13+deb7u6) but it is not going to be installed or
                    apache2-mpm-itk (= 2.2.22-13+deb7u6) but it is not going to be installed
           Depends: apache2.2-common (= 2.2.22-13+deb7u6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

그리고 aptitude:

sudo apt-get install apache2
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:
 apache2 : Depends: apache2-mpm-worker (= 2.2.22-13+deb7u6) but it is not going to be installed or
                    apache2-mpm-prefork (= 2.2.22-13+deb7u6) but it is not going to be installed or
                    apache2-mpm-event (= 2.2.22-13+deb7u6) but it is not going to be installed or
                    apache2-mpm-itk (= 2.2.22-13+deb7u6) but it is not going to be installed
           Depends: apache2.2-common (= 2.2.22-13+deb7u6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@dora:~# sudo aptitude install apache2
The following NEW packages will be installed:
  apache2 apache2-mpm-worker{a} apache2-utils{a} apache2.2-bin{a} apache2.2-common{a} libaprutil1-dbd-sqlite3{ab} libaprutil1-ldap{ab} 
0 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 1 290 kB of archives. After unpacking 5 146 kB will be used.
The following packages have unmet dependencies:
 libaprutil1-dbd-sqlite3 : Depends: libaprutil1 (= 1.4.1-3) but 1.5.4-1+b1 is installed.
 libaprutil1-ldap : Depends: libaprutil1 (= 1.4.1-3) but 1.5.4-1+b1 is installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     apache2 [Not Installed]                            
2)     apache2-mpm-worker [Not Installed]                 
3)     apache2.2-bin [Not Installed]                      
4)     apache2.2-common [Not Installed]                   
5)     libaprutil1-dbd-sqlite3 [Not Installed]            
6)     libaprutil1-ldap [Not Installed]                   



Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

이 문제를 해결하고 Apache를 다시 작동시키려면 어떻게 해야 합니까?


마틴에 대한 편집자의 답변:

cat /etc/apt/sources.list
deb http://debian.mirrors.ovh.net/debian/ wheezy main
deb-src http://debian.mirrors.ovh.net/debian/ wheezy main

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

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

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

deb http://security.debian.org/ testing/updates main
deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main

deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6
deb-src http://repo.mysql.com/apt/debian/ wheezy mysql-5.6

deb http://dl.google.com/linux/mod-pagespeed/deb/ stable main

마침내:

apt-cache policy libaprutil1
libaprutil1:
  Installed: 1.5.4-1+b1
  Candidate: 1.5.4-1+b1
  Version table:
 *** 1.5.4-1+b1 100
        100 /var/lib/dpkg/status
     1.4.1-3 500
        500 http://debian.mirrors.ovh.net/debian wheezy/main amd64 Packages

답변1

에 따르면 aptitude이름이 지정된 Apache 종속성은 libaprutil1저장소에 제공된 것보다 최신 버전으로 설치됩니다.

The following packages have unmet dependencies: 
libaprutil1-dbd-sqlite3 : Depends: libaprutil1 (= 1.4.1-3) but
1.5.4-1+b1 is installed.  libaprutil1-ldap : Depends: libaprutil1 (= 1.4.1-3) but 1.5.4-1+b1 is installed.

다음을 사용하여 패키지의 출처를 알아낼 수 있습니다 apt-cache policy.

apt-cache policy libaprutil1

libaprutil1=1.5.4-1+b1데비안 sid에서 온 것 같습니다... sid 저장소에서 Apache를 설치해 볼 기회가 있습니까? 이것은 좋은 생각이 아닌 것 같습니다... 최신 Apache 버전을 원한다면 권장합니다.데비안 제시로 업그레이드.

귀하의 질문에 의 출력을 첨부하십시오 apt-cache policy(그렇게 할 때 의 출력도 귀하의 질문에 첨부하십시오 ). wheezy 및 sid 저장소의 URL이 포함될 cat /etc/apt/sources.list수 있습니다 . 이는 좋지 않은 일입니다.sources.list

최신 패키지를 제거해 볼 수 있습니다 libaprutil1.

aptitude purge libaprutil1

그런 다음 Apache를 다시 설치해 보십시오.

aptitude install apache2

답변2

libaprutil1문제를 일으키는 패키지입니다(대부분 종속성일 가능성이 높음 libapr1). 다음을 수행해야 합니다.

  • testing/security; 에서 /etc/apt/sources.list해당 행을 제거하십시오 .
  • 패키지 캐시 업데이트:

    sudo apt-get update
    
  • 삭제 libaprutil1libapr1:

    sudo aptitude remove libaprutil1 libapr1
    

    (및 이에 의존하는 모든 패키지)

  • 그런 다음 다음을 설치하십시오 apache2.

    sudo aptitude install apache2
    

관련 정보