Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl-installer fails on systems without either systemd-resovled or resolvconf #1926

Open
Schniefel opened this issue May 9, 2024 · 9 comments
Assignees

Comments

@Schniefel
Copy link

When trying to install nextcloudpi via the curl-script on a freshly flashed Raspberry Pi OS (Bookworm) i get the following error:

Downloading updates
Performing updates
PHP Warning: Undefined variable $CONFIG in Command line code on line 1
PHP Warning: Trying to access array offset on value of type null in Command line code on line 1
PHP Warning: Undefined variable $CONFIG in Command line code on line 1
PHP Warning: Trying to access array offset on value of type null in Command line code on line 1
Installing clear-php-opcache
Installing dnsmasq

  • apt-get update
    Hit:1 http://archive.raspberrypi.com/debian bookworm InRelease
    Hit:2 http://deb.debian.org/debian bookworm InRelease
    Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
    Hit:4 http://deb.debian.org/debian bookworm-updates InRelease
    Hit:5 https://packages.sury.org/php bookworm InRelease
    Reading package lists... Done
  • apt-get install --no-install-recommends -y dnsmasq
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
    libraspberrypi0 libwpe-1.0-1 libwpebackend-fdo-1.0-1
    Use 'sudo apt autoremove' to remove them.
    Suggested packages:
    resolvconf
    The following NEW packages will be installed:
    dnsmasq
    0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
    Need to get 32.4 kB of archives.
    After this operation, 120 kB of additional disk space will be used.
    Get:1 http://deb.debian.org/debian bookworm/main arm64 dnsmasq all 2.89-1 [32.4 kB]
    Fetched 32.4 kB in 0s (567 kB/s)
    Selecting previously unselected package dnsmasq.
    (Reading database ... 246159 files and directories currently installed.)
    Preparing to unpack .../dnsmasq_2.89-1_all.deb ...
    Unpacking dnsmasq (2.89-1) ...
    Setting up dnsmasq (2.89-1) ...
    Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
  • rc=0
  • service dnsmasq status
  • [[ 0 -eq 3 ]]
  • echo 'Applying workaround for dnsmasq bug (compare issue Installation of dnsmasq breaks DNS-resolution #1446)'
    Applying workaround for dnsmasq bug (compare issue Installation of dnsmasq breaks DNS-resolution #1446)
  • mkdir -p /etc/systemd/resolved.conf.d
  • systemctl status systemd-resolved
    **Unit systemd-resolved.service could not be found.
  • systemctl stop resolvconf
    Failed to stop resolvconf.service: Unit resolvconf.service not loaded.**
@Schniefel
Copy link
Author

Update: I was able to install nextcloudpi by running apt install systemd-resolved before running the script

@vcbranco
Copy link

Is also a problem with the curl installation on Debian 12 x86_64.

@vcbranco
Copy link

In my case, all I had to do was install systemd-resolved, configure the dns server address and then run the script.
The curl installation was done correctly.

@Schniefel
Copy link
Author

I haven't even configured a dns-server.

@vcbranco
Copy link

I had to configure the address of the dns server because after installing systemd-resolved I restarted the server and was left without dns.
It probably wouldn't have been necessary to configure the dns if I ran the script without restarting the server after installing the package. But I haven't tested that.

@Schniefel
Copy link
Author

right, a restart fixed it for me

@darguez
Copy link

darguez commented May 13, 2024

When I tried to install nextcloudpi on my Raspberry Pi OS Lite 64-bit Debian 12 (bookworm) via curl script:
curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | sudo bash
I got the same error: Unit systemd-resolved.service could not be found

So, I manually installed the missing package apt install systemd-resolved but I missed DNS with the change and I had to manually add DNS in /etc/systemd/resolved.conf. Also I had to drop the ncp created mysql database sudo mysqladmin drop nextcloud to start over with ncp installation script.

Then the installation went on, but finished with a weird sql error (not sure if the script finished at all): Table "nextcloud.appconfig" doesn't exist

However, I checked ncp installation by accessing https://my-ip/ and the web installer was working, so after the initial setup everything seemed to work fine.

The only thing that wasn't work properly was letsencrypt, because after enabling it (without errors), the certificate was not updated, so I had to edit apache2 site config file to set the correct paths to the certificates in /etc/apache2/sites-enabled/001-nextcloud.conf.

And now everything seems to work fine.

@darguez
Copy link

darguez commented May 13, 2024

And now everything seems to work fine.

Well, I've just realized the HPB service is always down, so something went wrong with installation after all... Also there is no /var/www/nextcloud/apps/notify_push folder and command /occ notify_push:setup returns:

There are no commands defined in the "notify_push" namespace.

@darguez
Copy link

darguez commented May 13, 2024

And now everything seems to work fine.

Well, I've just realized the HPB service is always down, so something went wrong with installation after all... Also there is no /var/www/nextcloud/apps/notify_push folder and command /occ notify_push:setup returns:

There are no commands defined in the "notify_push" namespace.

It seems "Client Push" app was not installed, so after installing it from appstore and executing occ notify_push:setup HPB service is up now

@theCalcaholic theCalcaholic changed the title Unit systemd-resolved.service could not be found curl-installer fails on systems without either systemd-resovled or resolvconf May 21, 2024
@theCalcaholic theCalcaholic self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants