Reinstale o Apache2 após a limpeza: o apt-get diz que já é a versão mais recente

1

Ok, então eu desinstalei o apache2 (longa história ...).

sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common

whereis apache2

Então eu deletei todos os diretórios listados com sudo rm -rf

Agora estou tentando reinstalar o apache2 e nada parece funcionar.

sudo apt-get install apache2

retorna "o apache2 já é a versão mais recente"

Algumas pesquisas me levaram a tentar

sudo apt-get install apache2 -d --reinstall

Que não mostrou nada atualizado:

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

Retorna

Apache2:

e nada mais.

Agora estou preso. Alguma idéia de como posso recuperar o apache?

Eu também devo acrescentar que minha distro é Raspbian Jessie

Saída do 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
    
por Puckster 26.05.2017 / 05:29

2 respostas

1

Resolvido!

Em última análise, eu encontrei outro post para algo semelhante, e uma das respostas funcionou para mim:

sudo apt-get remove --purge apache2*
sudo apt-get --reinstall install apache2.2-common
sudo apt-get --reinstall install apache2

Eu acho que uma abordagem mais robusta de "limpeza" com o caractere curinga, bem como a reinstalação do apache2.2-common, foi o truque.

    
por 26.05.2017 / 19:44
0

purge deveria ter cuidado de tudo rm -rf provavelmente quebrou alguma coisa ou as coisas já estavam quebradas se a remoção não funcionasse e não relatou nenhum erro. Eu recomendo reinstalar e depois executar o script de configuração.

    
por 26.05.2017 / 08:32

Tags