Problems starting postgres

i created a cluster in “/var/lib/postgres/data/” entered after that the command “sudo systemctl enable postgresql” and wanted to run with “sudo systemctl status postgresql” exits

(postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-05-04 22:00:43 +05; 9 hours ago
CPU: 45ms

May 04 22:00:43 vladislav-macbookair systemd[1]: Starting PostgreSQL database server…
May 04 22:00:43 vladislav-macbookair postgres[447]: “/var/lib/postgres/data” is missing or empty. Use a command li>
May 04 22:00:43 vladislav-macbookair postgres[447]: su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/p>
May 04 22:00:43 vladislav-macbookair postgres[447]: with relevant options, to initialize the database cluster.
May 04 22:00:43 vladislav-macbookair systemd[1]: postgresql.service: Control process exited, code=exited, status=1>
May 04 22:00:43 vladislav-macbookair systemd[1]: postgresql.service: Failed with result ‘exit-code’.
May 04 22:00:43 vladislav-macbookair systemd[1]: Failed to start PostgreSQL database server.

Please format your outputs, as shown here:
[HowTo] Provide System Information

Also it appears your output is cut off. Please try to copy the whole information.

On to the problem itself…
Is the error accurate? Have you not actual created the db using somethign like ..postgres..initdb.. ?

See the wiki:
https://wiki.archlinux.org/title/PostgreSQL