Il faut changer votre
USER= ,GEOSERVER_DATA_DIR=, GEOSERVER_HOME= et JAVA_HOME= dans "init.d" comme dans "default". Le
# override these vars user that shall run GeoServer
Could be an issue with the file system format on your harddrive.
I had the same problem (Ubuntu 16.04). I eventually discovered that the error dissapeared when I changed the output_dir to a different harddrive. The harddrive I was using for input and output was formatted with NTFS file system. When I reformated the harddrive to EXT4-format the error ...
This is more difficult than expected when going against the grain of the latest releases, which is possible using the http://apt.postgresql.org/pub/repos/apt.
For example, when using postgresql-11 installations, simply adding postgis attempts to also add postgresql-12 !
$ dpkg -l | grep postg
ii pgdg-keyring 2018.2 ...
You have to remove the top and bottom lines of your nominatim.conf (<< EOFAPACHECONF) and replace $USERHOME with the path to the home directory of your user nominatim. That should solve the problem of restarting apache.