connection to postgresql error
at 2018-02-04 02:15:00.
if you get this error or something simular when installing metasploit on kali this is what you need to do
error:
Setting up metasploit (4.5.3-2013032701-1kali0) ... psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? Creating metasploit database user 'msf3'... createuser: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? dpkg: error processing metasploit (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: metasploit E: Sub-process /usr/bin/dpkg returned an error code (1)
solution:
gedit /etc/postgresql/9.1/main/postgresql.conf
and change the #listen_addresses = ‘localhost’
and port = 5433 to
listen_addresses = ‘localhost’
and port to 5432
then
service postgresql restart
apt-get remove metasploit && apt-get autoclean
apt-get install metasploit
and it should work just fin.
if any error put it in the comments below.