Omeka v2.4 설치 에러 - E: Sub-process /usr/bin/dpkg returned an error code (1)

Omeka 설치할 때 아래 명령어에서 에러가 발생합니다.

$ sudo apt-get install php5

설치환경은 AWS EC2 - Ubuntu 14.04 LTS Server 입니다.
아래는 터미널 메시지 붙여넣은 것입니다.



E: Sub-process /usr/bin/dpkg returned an error code (1)

root@ip-172-31-13-123:~# sudo apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up apache2 (2.4.20-1+deb.sury.org~trusty+2) ...
syntax error at /usr/sbin/a2enmod line 564, near ") {"
syntax error at /usr/sbin/a2enmod line 572, near "}"
syntax error at /usr/sbin/a2enmod line 589, near "}"
Execution of /usr/sbin/a2enmod aborted due to compilation errors.
dpkg: error processing package apache2 (--configure):
 subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of libapache2-mod-php5:
 libapache2-mod-php5 depends on apache2 (>= 2.4); however:
  Package apache2 is not configured yet.

dpkg: error processing package libapache2-mod-php5 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.5.34+dfsg-1+deb.sury.org~trusty+1~) | libapache2-mod-php5filter (>= 5.5.34+dfsg-1+deb.sury.org~trusty+1~) | php5-cgi (>= 5.5.34+dfsg-1+deb.sury.org~trusty+1~) | php5-fpm (>= 5.5.34+dfsg-1+deb.sury.org~trusty+1~); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.

dpkg: error processing package php5 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 apache2
 libapache2-mod-php5
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Tagged:

Comments

  • 위의 에러는 우분투 운영체제에서 apt-get 명령으로 패키지들을 설치할 때 드물게 발생되는 의존성 문제로 보입니다.혹시 오메카를 설치하신 분께서 apache2를 설치하기 전에 먼저  php5를 설치한 것은 아닌가 확인이 필요합니다. 만약 그랬다면 위와 같은 의존성 문제가 생길 수 밖에 없습니다. 예를 들어 libapache2-mod-php5는 해당 php 모듈이 아파치와 연계되어 있는데 아파치가 안 깔려 있는 상태에선 당연히 해당 연관 패키지를 찾지 못하니 에러가 발생할 수 밖에 없습니다. 위의 에러 메시지 중 "libapache2-mod-php5 depends on apache2 (>= 2.4); however:  Package apache2 is not configured yet."에 이미 해답이 나와 있습니다.

    일단 아래의 명령어로 에러난 패키지들을 삭제하고 다시 설치해 보시기 바랍니다.
    $ sudo apt-get remove php5  또는 sudo apt-get purge php5
    $ sudo apt-get remove libapache2-mod-php5  또는 sudo apt-get purge libapache2-mod-php5
    $ sudo apt-get autoremove
    $ sudo apt-get clean
    $ sudo apt-get autoclean
    $ sudo apt-get install apache2  또는 sudo apt-get --reinstall apache2
    $ sudo apt-get install php5  또는 sudo apt-get --reinstall php5
    $ sudo apt-get install libapache2-mod-php5  또는 sudo apt-get --reinstall libapache2-mod-php5

    손상된 패키지를 복구하 명령은 다음과 같은데 복구가 잘 안될 수도 있습니다.
    위의 방법을 먼저 해보시고 아래의 방법을 사용해 보세요.

    $ sudo apt-get -f install
    $ sudo apt-get autoremove
    $ sudo apt-get --reinstall apache2
    $ sudo apt-get --reinstall php5
    $ sudo apt-get --reinstall libapache2-mod-php5

    해보시고 그래도 안되면 다시 코멘트 주세요.

Sign In or Register to comment.