좋아, 그래서 apache2를 제거했습니다(긴 이야기...).
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
whereis apache2
그런 다음 sudo rm -rf로 나열된 모든 디렉토리를 삭제했습니다.
이제 apache2를 다시 설치하려고 하는데 아무 것도 작동하지 않는 것 같습니다.
sudo apt-get install apache2
"apache2는 이미 최신 버전입니다"를 반환합니다.
일부 검색을 통해 시도해 봤습니다.
sudo apt-get install apache2 -d --reinstall
업데이트된 내용이 아무것도 표시되지 않았습니다.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 93 not upgraded.
Need to get 0 B/208 kB of archives.
After this operation, 0 B of additional disk space will be used.
Download complete and in download only mode
whereis apache2
보고
Apache2:
그리고 다른 것은 없습니다.
이제 나는 막혔습니다. 아파치를 백업하는 방법에 대한 아이디어가 있습니까?
또한 내 배포판이 Raspbian Jessie라는 점을 추가해야 합니다.
dpkg -L apache2의 출력
/.
/etc
/etc/apache2
/etc/apache2/mods-enabled
/etc/apache2/conf-enabled
/etc/apache2/sites-enabled
/etc/apache2/apache2.conf
/etc/apache2/conf-available
/etc/apache2/conf-available/security.conf
/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf-available/serve-cgi-bin.conf
/etc/apache2/conf-available/charset.conf
/etc/apache2/conf-available/other-vhosts-access-log.conf
/etc/apache2/envvars
/etc/apache2/magic
/etc/apache2/mods-available
/etc/apache2/mods-available/slotmem_plain.load
/etc/apache2/mods-available/speling.load
/etc/apache2/mods-available/autoindex.conf
/etc/apache2/mods-available/include.load
/etc/apache2/mods-available/authn_dbm.load
/etc/apache2/mods-available/mpm_worker.load
/etc/apache2/mods-available/reqtimeout.conf
/etc/apache2/mods-available/session_cookie.load
/etc/apache2/mods-available/log_forensic.load
/etc/apache2/mods-available/cgid.load
/etc/apache2/mods-available/proxy.load
/etc/apache2/mods-available/status.conf
/etc/apache2/mods-available/access_compat.load
/etc/apache2/mods-available/actions.conf
/etc/apache2/mods-available/buffer.load
/etc/apache2/mods-available/heartmonitor.load
/etc/apache2/mods-available/proxy_wstunnel.load
/etc/apache2/mods-available/mpm_prefork.load
/etc/apache2/mods-available/info.load
/etc/apache2/mods-available/dbd.load
/etc/apache2/mods-available/lbmethod_bybusyness.load
/etc/apache2/mods-available/authnz_ldap.load
/etc/apache2/mods-available/rewrite.load
/etc/apache2/mods-available/proxy_scgi.load
/etc/apache2/mods-available/userdir.load
/etc/apache2/mods-available/usertrack.load
/etc/apache2/mods-available/cgi.load
/etc/apache2/mods-available/mpm_event.conf
/etc/apache2/mods-available/alias.conf
/etc/apache2/mods-available/proxy_ajp.load
/etc/apache2/mods-available/ident.load
/etc/apache2/mods-available/ldap.conf
/etc/apache2/mods-available/dav_fs.load
/etc/apache2/mods-available/proxy_fdpass.load
/etc/apache2/mods-available/dialup.load
/etc/apache2/mods-available/sed.load
/etc/apache2/mods-available/mpm_event.load
/etc/apache2/mods-available/lbmethod_heartbeat.load
/etc/apache2/mods-available/ldap.load
/etc/apache2/mods-available/xml2enc.load
/etc/apache2/mods-available/mime.conf
/etc/apache2/mods-available/remoteip.load
/etc/apache2/mods-available/filter.load
/etc/apache2/mods-available/mime_magic.conf
/etc/apache2/mods-available/heartbeat.load
/etc/apache2/mods-available/lbmethod_byrequests.load
/etc/apache2/mods-available/unique_id.load
/etc/apache2/mods-available/autoindex.load
/etc/apache2/mods-available/authz_user.load
/etc/apache2/mods-available/mpm_prefork.conf
/etc/apache2/mods-available/info.conf
/etc/apache2/mods-available/cache_socache.load
/etc/apache2/mods-available/setenvif.conf
/etc/apache2/mods-available/authn_file.load
/etc/apache2/mods-available/slotmem_shm.load
/etc/apache2/mods-available/cache_disk.load
/etc/apache2/mods-available/deflate.load
/etc/apache2/mods-available/dav.load
/etc/apache2/mods-available/proxy_balancer.conf
/etc/apache2/mods-available/deflate.conf
/etc/apache2/mods-available/proxy_connect.load
/etc/apache2/mods-available/echo.load
/etc/apache2/mods-available/dir.conf
/etc/apache2/mods-available/actions.load
/etc/apache2/mods-available/authz_owner.load
/etc/apache2/mods-available/dump_io.load
/etc/apache2/mods-available/setenvif.load
/etc/apache2/mods-available/file_cache.load
/etc/apache2/mods-available/env.load
/etc/apache2/mods-available/ext_filter.load
/etc/apache2/mods-available/mime.load
/etc/apache2/mods-available/negotiation.load
/etc/apache2/mods-available/ssl.conf
/etc/apache2/mods-available/dav_lock.load
/etc/apache2/mods-available/dir.load
/etc/apache2/mods-available/cache.load
/etc/apache2/mods-available/ssl.load
/etc/apache2/mods-available/auth_digest.load
/etc/apache2/mods-available/authz_groupfile.load
/etc/apache2/mods-available/substitute.load
/etc/apache2/mods-available/authn_core.load
/etc/apache2/mods-available/proxy_ftp.conf
/etc/apache2/mods-available/socache_shmcb.load
/etc/apache2/mods-available/userdir.conf
/etc/apache2/mods-available/auth_basic.load
/etc/apache2/mods-available/suexec.load
/etc/apache2/mods-available/session_crypto.load
/etc/apache2/mods-available/allowmethods.load
/etc/apache2/mods-available/dav_fs.conf
/etc/apache2/mods-available/reflector.load
/etc/apache2/mods-available/charset_lite.load
/etc/apache2/mods-available/mpm_worker.conf
/etc/apache2/mods-available/session_dbd.load
/etc/apache2/mods-available/authz_core.load
/etc/apache2/mods-available/proxy_ftp.load
/etc/apache2/mods-available/proxy_express.load
/etc/apache2/mods-available/vhost_alias.load
/etc/apache2/mods-available/headers.load
/etc/apache2/mods-available/ratelimit.load
/etc/apache2/mods-available/proxy_http.load
/etc/apache2/mods-available/log_debug.load
/etc/apache2/mods-available/authz_host.load
/etc/apache2/mods-available/authz_dbm.load
/etc/apache2/mods-available/proxy.conf
/etc/apache2/mods-available/cache_disk.conf
/etc/apache2/mods-available/data.load
/etc/apache2/mods-available/status.load
/etc/apache2/mods-available/request.load
/etc/apache2/mods-available/mime_magic.load
/etc/apache2/mods-available/proxy_html.conf
/etc/apache2/mods-available/alias.load
/etc/apache2/mods-available/proxy_balancer.load
/etc/apache2/mods-available/proxy_html.load
/etc/apache2/mods-available/proxy_fcgi.load
/etc/apache2/mods-available/negotiation.conf
/etc/apache2/mods-available/reqtimeout.load
/etc/apache2/mods-available/authn_socache.load
/etc/apache2/mods-available/expires.load
/etc/apache2/mods-available/lbmethod_bytraffic.load
/etc/apache2/mods-available/auth_form.load
/etc/apache2/mods-available/authnz_fcgi.load
/etc/apache2/mods-available/authz_dbd.load
/etc/apache2/mods-available/authn_anon.load
/etc/apache2/mods-available/cgid.conf
/etc/apache2/mods-available/macro.load
/etc/apache2/mods-available/socache_memcache.load
/etc/apache2/mods-available/session.load
/etc/apache2/mods-available/asis.load
/etc/apache2/mods-available/lua.load
/etc/apache2/mods-available/socache_dbm.load
/etc/apache2/mods-available/authn_dbd.load
/etc/apache2/ports.conf
/etc/apache2/sites-available
/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-available/default-ssl.conf
/etc/logrotate.d
/etc/logrotate.d/apache2
/etc/bash_completion.d
/etc/bash_completion.d/apache2
/etc/cron.daily
/etc/cron.daily/apache2
/etc/default
/etc/default/apache2
/etc/init.d
/etc/init.d/apache2
/usr
/usr/lib
/usr/lib/cgi-bin
/usr/share
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/apache2
/usr/share/bug
/usr/share/bug/apache2
/usr/share/apache2
/usr/share/apache2/ask-for-passphrase
/usr/share/apache2/apache2-maintscript-helper
/usr/share/doc
/usr/share/doc/apache2
/usr/share/doc/apache2/README.backtrace
/usr/share/doc/apache2/README.multiple-instances
/usr/share/doc/apache2/migrate-sites.pl
/usr/share/doc/apache2/copyright
/usr/share/doc/apache2/examples
/usr/share/doc/apache2/examples/setup-instance
/usr/share/doc/apache2/examples/secondary-init-script
/usr/share/doc/apache2/examples/apache2.monit
/usr/share/doc/apache2/PACKAGING.gz
/usr/share/doc/apache2/README.Debian.gz
/usr/share/doc/apache2/changelog.Debian.gz
/usr/share/doc/apache2/NEWS.Debian.gz
/usr/share/doc/apache2/changelog.gz
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/apache2ctl.8.gz
/usr/share/man/man8/a2enmod.8.gz
/usr/share/man/man8/a2ensite.8.gz
/usr/share/man/man8/a2enconf.8.gz
/usr/share/man/man1
/usr/share/man/man1/a2query.1.gz
/usr/sbin
/usr/sbin/a2enmod
/usr/sbin/apache2ctl
/usr/sbin/a2query
/var
/var/lib
/var/lib/apache2
/var/cache
/var/cache/apache2
/var/cache/apache2/mod_cache_disk
/var/log
/var/log/apache2
/var/www
/var/www/html
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/apache2.service.d
/lib/systemd/system/apache2.service.d/forking.conf
/usr/share/bug/apache2/control
/usr/share/bug/apache2/script
/usr/share/man/man8/a2disconf.8.gz
/usr/share/man/man8/apachectl.8.gz
/usr/share/man/man8/a2dismod.8.gz
/usr/share/man/man8/a2dissite.8.gz
/usr/sbin/apachectl
/usr/sbin/a2disconf
/usr/sbin/a2enconf
/usr/sbin/a2dissite
/usr/sbin/a2ensite
/usr/sbin/a2dismod
답변1
해결되었습니다!
결국, 나는 발견했다다른 게시물비슷한 것에 대해 응답 중 하나가 저에게 효과적이었습니다.
sudo apt-get remove --purge apache2*
sudo apt-get --reinstall install apache2.2-common
sudo apt-get --reinstall install apache2
나는 와일드카드를 사용하고 apache2.2-common을 다시 설치하는 보다 강력한 "퍼지" 접근 방식이 비결이라고 생각합니다.
답변2
purge
rm -rf
퍼지가 작동하지 않고 오류가 보고되지 않은 경우 무언가가 파손되었거나 이미 파손되었을 가능성이 있는 모든 것을 처리했어야 합니다 . 다시 설치한 다음 설정 스크립트를 실행하는 것이 좋습니다.