How do I solve PostgreSQL "Aborted (core dumped)" error? - postgresql

I am trying to install postgreSQL-9.6.4 on Ubuntu 14.04. But when I am running 'initdb' to create database cluster, it shows error.
$ ./configure --prefix=/path/to/install
$ make
$ make install
$ initdb -U user1 -D /path/to/install/data
When I run the 'initdb', it shows the following error:
Aborted (core dumped)
child process exited with exit code 134
initdb: removing contents of data directory "/path/to/install/data"
Any help?

Exit status 134 means that the process was called by a SIGABRT signal, since that signal has number 6, and 128 + 6 = 134.
Your process probably failed an assert(3) assertion. Did you ./configure --with-cassert?
Try to read the core dump with gdb and use bt to get a back trace. That should tell you where exactly execution failed, so you can fix the problem.

Related

postgresql command not working; Error: invalid option '-o'

I am trying to fix this previous error when I am unable to find the PostgreSQL client library, however, when I run the suggested command:
ridk exec sh -c "pacman -S ${MINGW_PACKAGE_PREFIX}-postgresql"
I get this error. Not sure how to fix, any help is appreciated
error: invalid option '-o'
I tried the other suggestions such as:
gem install pg -- --with-pg-config=/path/to/pg_config
But I still get the same error.

I got this Error when i try to install reNgine, any Suggest?

when I try to install reNgine recon tool, it always stops at (32/51) and gives me this error, I tried searching for it but no luck
failed to solve: executor failed running [/bin/sh -c GO111MODULE=on go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei#latest]: exit code: 2
make: *** [Makefile:22: up] Error 17
I tried to run
GO111MODULE=on go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei#latest
and reinstall it but the same Error pops up

deleting files in /var/lib/postgresql/12/main while attempting to replication in postresql

I am new to postgres and was following this tutorial for setting Up Physical Streaming Replication with PostgreSQL
In step 3 while running the following command:
sudo -u postgres rm -r /var/lib/postgresql/12/main/*
I was getting the following error
rm: cannot remove '/var/lib/postgresql/12/main/*': No such file or directory
while the /var/lib/postgresql/12/main/ clearly had many files if explored manually.
In desperation, I deleted all the files inside /var/lib/postgresql/12/main/ manually and now any of the further steps are not working.
I have even tried to uninstall and install postgresql-12 using
sudo apt-get --purge remove postgresql
and
sudo apt -y install postgresql-12 postgresql-client-1 respectively
I have even tried doing the whole process again from start and while running the following command:
sudo -u postgres psql
sudo pg_ctlcluster 12 main start
I got this error:
Job for postgresql#12-main.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status postgresql#12-main.service" and "journalctl -xe" for details.
while resolving the above issue using :
sudo chown postgres.postgres /var/lib/postgresql/12/main/global/pg_internal.init
I got this error...
chown: cannot access '/var/lib/postgresql/12/main/global/pg_internal.init': No such file or directory
I think this is happening because of the manual deletion of all the files and folder in
/var/lib/postgresql/12/main/
Any help is much appreciated
Thanks
The glob * is evaluated by your regular user before the sudo is invoked, but your regular user can't see into that directory. So what gets sent to the postgres user is an order to remove the file with the literal name of '/var/lib/postgresql/12/main/*', which doesn't exist. You would need to have your shell that evaluated the glob be postgres, so it can see what it is doing before invoking rm. Something like:
sudo -u postgres bash -c 'rm -r /var/lib/postgresql/12/main/*'
For the rest of it, you didn't give enough details to know what is going on, like what was in the logs, or what were the directory listings at the time your command failed.

CentOS Mondo Rescue Error to Restore the iso: Kernel Panic

I am trying to create an image (.iso) of my installed CentOS 5.11 system, for this i am using the "Mondo Rescue" with the command:
mondoarchive -Oi -9 -L -d /tmp/centos_iso -I / -T /tmp/centos_iso -p centos_image -s 4480m -E "/tmp|/var/spool/squid|/var/log"
The image is generated, and apparently is functional.
To install the iso in other machine i'm using the option "Nuke", in initialization page of "Mondo Rescue", like is represented in below image
When attempting to perform the installation, the following error occurs during the process:
Kernel panic - not syncing: No init found. Try passing init= options to kernel.

What does Usage: psql [wait] mean?

I'm trying to use psql version 9.6 on Mac OSX 10.11 and installed from the EnterpriseDB installer but I'm getting the following error:
MacBook-Pro:local me$ which psql
/usr/local/bin/psql
MacBook-Pro:local me$ /usr/local/bin/psql -h localhost; echo "Error code: $?"
Usage: /usr/local/bin/psql [wait]
Error code: 127
As you can see, I'm simply trying to connect to localhost and I'm getting a usage error despite following the syntax from the manual.
What is happening here?
Your bash is returning the error code 127: command not found.
See 127 Return code from $? for more details about this bash code.
Make sure that psql is in the directory you're trying to access.
Simple mistake - /usr/local/bin/psql was a symlink for /Library/PostgreSQL/9.6/scripts/runpsql.sh which doesn't accept any arguments... it's basically EnterpriseDB's shell script wrapper around the actual actual binary which is /Library/PostgreSQL/9.6/bin/psql.
I just needed to point psql to the real executable and not that shell script.