meefik / linuxdeploy

Install and run GNU/Linux on Android
https://meefik.github.io/linuxdeploy
GNU General Public License v3.0
5.27k stars 680 forks source link

Postgresql cluster shared memory segment error. #1174

Open 4V4loon opened 4 years ago

4V4loon commented 4 years ago

I connected to Kali Linux using SSH, I wanted to install Postgresql and An error like this occurred: `creating configuration files ... ok running bootstrap script ... 2020-03-14 13:15:01.119 +04 [25527] FATAL: could not create shared memory segment: Function not implemented 2020-03-14 13:15:01.119 +04 [25527] DETAIL: Failed system call was shmget(key=5432001, size=40, 03600). child process exited with exit code 1 initdb: removing contents of data directory /var/lib/postgresql/12/main Error: initdb failed Error: could not create default cluster. Please create it manually with

pg_createcluster 12 main --start

or a similar command (see man pg_createcluster). update-alternatives: using /usr/share/postgresql/12/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode invoke-rc.d: could not determine current runlevel invoke-rc.d: WARNING: No init system and policy-rc.d missing! Defaulting to block. Setting up postgresql (12+214) ... Processing triggers for systemd (244.3-1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.29-10) ...`

How can i solve the problem?

fenghongluo commented 3 years ago

Have you solved the problem? I had the same problem too

krak3n77 commented 3 years ago

I connected to Kali Linux using SSH, I wanted to install Postgresql and An error like this occurred: `creating configuration files ... ok running bootstrap script ... 2020-03-14 13:15:01.119 +04 [25527] FATAL: could not create shared memory segment: Function not implemented 2020-03-14 13:15:01.119 +04 [25527] DETAIL: Failed system call was shmget(key=5432001, size=40, 03600). child process exited with exit code 1 initdb: removing contents of data directory /var/lib/postgresql/12/main Error: initdb failed Error: could not create default cluster. Please create it manually with

pg_createcluster 12 main --start

or a similar command (see man pg_createcluster). update-alternatives: using /usr/share/postgresql/12/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode invoke-rc.d: could not determine current runlevel invoke-rc.d: WARNING: No init system and policy-rc.d missing! Defaulting to block. Setting up postgresql (12+214) ... Processing triggers for systemd (244.3-1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.29-10) ...`

How can i solve the problem?

So i know this issue is from last year, but I wanted to share my input on the problem.

running bootstrap script ... 2020-03-14 13:15:01.119 +04 [25527] FATAL: could not create shared memory segment: Function not implemented

^ I dont know exactly how linux deploy does things, but ive ran into the shem memory issue in the past while using Kali Nethunter on my phone. I seen some posts on reddit saying that its a kernel support thing. I am not very knowledgeable in linux/android kernel, but I was able to fix it by installing the nethunter patched kernel for my device. I also assume, you could also find other custom kernels that would fix the issue, but I have no idea what to tell you to look for.