- Thread Starter
- #26
According to ChatGPT:
Code:php83-fpm
Is there such a thing?
According to ChatGPT:
Code:php83-fpm
There is no such pkg as php**-fpm but php-fpm does get installed in /usr/local/sbin as part of some other php pkg.Is there such a thing?
echo -n 'pkg install -y '> nextcloud-install.sh
cat << EOF | tr '\n' ' ' >> nextcloud-install.sh
nextcloud-php84
postgresql18-server
php84
php84-pgsql
php84-gd
php84-curl
php84-zip
php84-mbstring
php84-intl
php84-bcmath
php84-gmp
php84-opcache
php84-pecl-APCu
php84-pecl-imagick
php84-exif
php84-fileinfo
php84-posix
php84-sockets
php84-ldap
php84-pecl-redis
caddy
redis
EOF
You need the shebang line at the top of the script.I have the following script to install all the packages I need for nextcloud, but for some reason it runs without any errors although postgresql18-server does not get installed.
Can anyone explain what the problem could be?
Installing it separately works without any problem.
sh:echo -n 'pkg install -y '> nextcloud-install.sh cat << EOF | tr '\n' ' ' >> nextcloud-install.sh nextcloud-php84 postgresql18-server php84 php84-pgsql php84-gd php84-curl php84-zip php84-mbstring php84-intl php84-bcmath php84-gmp php84-opcache php84-pecl-APCu php84-pecl-imagick php84-exif php84-fileinfo php84-posix php84-sockets php84-ldap php84-pecl-redis caddy redis EOF
#!/bin/sh
I have the following script to install all the packages I need for nextcloud, but for some reason it runs without any errors although postgresql18-server does not get installed.
Can anyone explain what the problem could be?
Installing it separately works without any problem.
sh:echo -n 'pkg install -y '> nextcloud-install.sh cat << EOF | tr '\n' ' ' >> nextcloud-install.sh nextcloud-php84 postgresql18-server php84 php84-pgsql php84-gd php84-curl php84-zip php84-mbstring php84-intl php84-bcmath php84-gmp php84-opcache php84-pecl-APCu php84-pecl-imagick php84-exif php84-fileinfo php84-posix php84-sockets php84-ldap php84-pecl-redis caddy redis EOF
21 of the 22 pkgs get installed without this.You need the shebang line at the top of the script.
Code:#!/bin/sh
I tried explain that the nextcloud-install.sh runs and installs all the pkgs bar one, ie postrgresql18-server.You need to execute the nextcloud-install.sh that it builds.
I'm not sure, I'll see. I was just going by what I had read from various sources.Apologies, but shouldn’t you be able to just do `pkg install nextcloud-php84` to also install all dependencies?
I've tried running the script numerous times and it fails to install postgresql.The script installs caddy as the webserver, either mariadb or postgres depending on what you choose as the database, and configures the admin user with a random password.
All the info is shown at the end and saved inside the root directory.
Once finished the webserver will be running, the database will be set up and configured, and an initial admin user. Yes you can change the admin password inside the script if you don’t want the random one.
#!/bin/sh
# Install Nextcloud
APP_NAME="Nextcloud"
APP_VERSION="32"
ADMIN_PASSWORD="ADMIN"
MX_WINDOW="5"
DB_TYPE="PostgreSQL"
DB_NAME="nextcloud"
DB_USER="nextcloud"
DB_ROOT_PASSWORD="ADMIN"
DB_PASSWORD="ADMIN"
NO_CERT=1
SELFSIGNED_CERT=1
STANDALONE_CERT=0
DNS_CERT=0
DNS_PLUGIN=""
DNS_TOKEN=""
CERT_EMAIL=""
COUNTRY_CODE="GB"
HOST_NAME="nextcloud"
TIME_ZONE="GMT"
PHP_VERSION="84"
MARIADB_VERSION="118"
PG_VERSION="18"
+ chmod 600 /root/.pgpass
+ sed -i '' 's|mypassword|ADMIN|' /root/.pgpass
+ mkdir /var/db/postgres
mkdir: /var/db/postgres: File exists
+ chown postgres /var/db/postgres
chown: postgres: illegal user name
+ service postgresql initdb
postgresql does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
+ service postgresql start
postgresql does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
+ psql -U postgres -c $'CREATE DATABASE nextcloud TEMPLATE template0 ENCODING \'UTF8\';'
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
+ echo 'Failed to create Nextcloud database, aborting'
Failed to create Nextcloud database, aborting
+ exit 1
Command exit status: 1
Script done on Wed Mar 18 21:54:29 2026
Iirc early-on I couldn't get sockets working for PHP-FPM stuff and/or MariaDB connections on FreeBSD; I used ports instead (127.0.0.1:9001 vs site.sock)psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
define( 'DB_HOST', '127.0.0.1' ); vs using localhost Windows/LinuxThe error occurs because postgresql didn't get installed.Iirc early-on I couldn't get sockets working for PHP-FPM stuff and/or MariaDB connections on FreeBSD; I used ports instead (127.0.0.1:9001 vs site.sock)
Like with WordPress I had to setdefine( 'DB_HOST', '127.0.0.1' );vs using localhost Windows/Linux
It looks like the installation fails but the script continues. The errors that you've posted are the ones after the initial installation has failed. Are there any error messages prior to the ones that you posted above?The error occurs because postgresql didn't get installed.
The error occurs because postgresql didn't get installed.
This seems to be related to postgresql18. After changing to 17 things went smoothly.
I get this in my log:Can you check that postgresql18-server was actually installed successfully? The error message 'chown: postgres: illegal user name' makes it seem that the postgres user hasn't been created, which is part of the postgresql18-server installation script. If the installation wasn't successful that would also explain the error message 'postgresql does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable'. If you can post the relevant parts of the nextcloud script that installs and sets up postgresql that would help.
postgresql17-client: 17.9 [FreeBSD-ports]
[nextcloud] [5/8] Fetching postgresql17-client-17.9: 100% 4 MiB 3.8 M/s 00:01
- postgresql17-client-17.9 [FreeBSD-ports] conflicts with postgresql18-client-18.3 [FreeBSD-ports] on /usr/local/bin/clusterdb
postgresql17-client: 17.9 [FreeBSD-ports]
[nextcloud] [4/6] Installing postgresql17-client-17.9...
[nextcloud] [4/6] Extracting postgresql17-client-17.9: 100%
Message from postgresql17-client-17.9:
Originally I put 18 into the variables but that caused a problem. When I changed it to 17 the postgresql17-server did get installed.Those messages relate to the client. Any messages relating to the postgresql server?
There is no such pkg.Haha that’s the thing with AI. You never can tell.
Trypkg search php83-fpm
The problem is searching for something which doesn't exist finds nothing.Suggestion(s):
1. try to get into the habit of using `pkg search -Q full <pkg>`
2. try to get in the habit of using pkg origins.
3. try to get into the habit of using "glob". -e.g. `pkg search -g "php8[0-9]-f*"`.
pkg install freenginx-devel php85 days ago (fpm's included)It's likely without a dash; I didpkg install freenginx-devel php85days ago (fpm's included)