
누락되거나 손상된 구성에 대해 apache2 작업을 다시 시작할 수 없기 때문에 apache2-bin을 설치하려고 합니다. 그리고 내 웹사이트가 다운되었거나 apache2를 실행하지 않으면 제대로 리디렉션되지 않습니다. 그래서 설치하려고 할 때 다음 오류가 발생합니다.
The following NEW packages will be installed:
apache2-bin
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 0 B/1067 kB of archives.
After this operation, 3979 kB of additional disk space will be used.
(Reading database ... 106699 files and directories currently installed.)
Preparing to unpack .../apache2-bin_2.4.23-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking apache2-bin (2.4.23-1+deb.sury.org~trusty+1) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.23-1+deb.sury.org~trusty+1_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/apache2', which is also in package apache2-mpm-worker 2.2.22-1ubuntu1.11
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.23-1+deb.sury.org~trusty+1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)***
답변1
이 문제는 다음 응답을 사용하여 해결되었습니다.
첫 번째:
sudo apt-get --purge remove apache2
sudo apt-get autoremove
그런 다음 apache2 설치는 다음과 같이 간단합니다.
sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
테스트하려면:
스라소니 "http://localhost"