Skip to content

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

Closed

Description

@Schniefel

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.**

Activity

  1. Schniefel commented on May 10, 2024

    @Schniefel
    Author

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

  2. vcbranco commented on May 11, 2024

    @vcbranco

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

  3. vcbranco commented on May 11, 2024

    @vcbranco

    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.

  4. Schniefel commented on May 11, 2024

    @Schniefel
    Author

    I haven't even configured a dns-server.

  5. vcbranco commented on May 11, 2024

    @vcbranco

    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.

  6. Schniefel commented on May 11, 2024

    @Schniefel
    Author

    right, a restart fixed it for me

  7. darguez commented on May 13, 2024

    @darguez

    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.

  8. darguez commented on May 13, 2024

    @darguez

    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.

  9. darguez commented on May 13, 2024

    @darguez

    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

  10. changed the title [-]Unit systemd-resolved.service could not be found[/-] [+]curl-installer fails on systems without either systemd-resovled or resolvconf[/+] on May 21, 2024
  11. ovpc commented on May 29, 2024

    @ovpc
    Collaborator

    I have same issue on Proxmox VM with installer
    script ends with: Failed to stop resolvconf.service: Unit resolvconf.service not loaded
    When i install resolv.conf it breaks the dns and apt canot connect anymore

  12. 6 remaining items

  13. theCalcaholic commented on Aug 26, 2024

    @theCalcaholic
    Collaborator

    @e8johan Glad to hear you made it work.

    Out of curiosity: is there a reason why using the official NCP image for RPi 5 was not an option?

  14. e8johan commented on Aug 26, 2024

    @e8johan

    I guess two parts: first reason is that I did that last time installing NextCloudPi (on a 32-bit install on a Pi3), second reason is the feeling of control - having the user and ssh keys that I'm used to from start, instead of having to add that afterwards for that seamless ssh admin experience ;-)

  15. HervePruvost commented on Aug 26, 2024

    @HervePruvost

    @e8johan Glad to hear you made it work.

    Out of curiosity: is there a reason why using the official NCP image for RPi 5 was not an option?

    In my case, I don't use the headless OS but rather the RaspberryPi OS Full with the desktop environment. The NCP image comes with the headless OS only.

    So that is practical for me to be able to install NCP ad-hoc afterwards. Instead of having to reinstall desktop environment and related packages separately.

  16. ksd73429udmn commented on Sep 1, 2024

    @ksd73429udmn

    Are you still planning to make the curl script work some day? It would also help me a lot.

  17. theCalcaholic commented on Sep 4, 2024

    @theCalcaholic
    Collaborator

    @ksd73429udmn I do, after NC 30 support

  18. HervePruvost commented on Sep 4, 2024

    @HervePruvost

    @ksd73429udmn I do, after NC 30 support

    Is there an approximate timeline for this?

  19. theCalcaholic commented on Sep 5, 2024

    @theCalcaholic
    Collaborator

    @HervePruvost There's an approximate timeline for the NC29 update (should arrive until the end of next week). Other than that, I can't give an ETA

  20. wulfsystems commented on Oct 6, 2024

    @wulfsystems

    Hi guys,
    is there something new?

  21. Schniefel commented on Oct 24, 2024

    @Schniefel
    Author

    Nextcloud 30 is available, when can we expect support for it and this bug fix?

  22. added a commit that references this issue on Nov 6, 2024
    a3ccf15
  23. remz1337 commented on Nov 6, 2024

    @remz1337

    @theCalcaholic I tested the latest patch and issue persist. Script fails after installing systemd-resolved

    Logs:

    The following NEW packages will be installed:
      systemd-resolved
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 307 kB of archives.
    After this operation, 833 kB of additional disk space will be used.
    Get:1 http://deb.debian.org/debian bookworm/main amd64 systemd-resolved amd64 252.30-1~deb12u2 [307 kB]
    Fetched 307 kB in 0s (3,646 kB/s)    
    Selecting previously unselected package systemd-resolved.
    (Reading database ... 24133 files and directories currently installed.)
    Preparing to unpack .../systemd-resolved_252.30-1~deb12u2_amd64.deb ...
    Unpacking systemd-resolved (252.30-1~deb12u2) ...
    Setting up systemd-resolved (252.30-1~deb12u2) ...
    Converting /etc/resolv.conf to a symlink to /run/systemd/resolve/stub-resolv.conf...
    Creating group 'systemd-resolve' with GID 996.
    Creating user 'systemd-resolve' (systemd Resolver) with UID 996 and GID 996.
    Created symlink /etc/systemd/system/dbus-org.freedesktop.resolve1.service → /lib/systemd/system/systemd-resolved.service.
    Created symlink /etc/systemd/system/sysinit.target.wants/systemd-resolved.service → /lib/systemd/system/systemd-resolved.service.
    Processing triggers for dbus (1.14.10-1~deb12u1) ...
    Processing triggers for man-db (2.11.2-2) ...
    Installing nc-nextcloud
    Ign:1 http://security.debian.org bookworm-security InRelease
    Ign:2 https://packages.sury.org/php bookworm InRelease             
    Ign:3 http://deb.debian.org/debian bookworm InRelease              
    Ign:4 http://deb.debian.org/debian bookworm-updates InRelease
    Ign:3 http://deb.debian.org/debian bookworm InRelease
    Ign:1 http://security.debian.org bookworm-security InRelease            
    Ign:2 https://packages.sury.org/php bookworm InRelease                  
    Ign:4 http://deb.debian.org/debian bookworm-updates InRelease
    Ign:1 http://security.debian.org bookworm-security InRelease
    Ign:3 http://deb.debian.org/debian bookworm InRelease              
    Ign:2 https://packages.sury.org/php bookworm InRelease             
    Ign:4 http://deb.debian.org/debian bookworm-updates InRelease
    Err:2 https://packages.sury.org/php bookworm InRelease
      Temporary failure resolving 'packages.sury.org'
    Err:3 http://deb.debian.org/debian bookworm InRelease                
      Temporary failure resolving 'deb.debian.org'
    Err:1 http://security.debian.org bookworm-security InRelease         
      Temporary failure resolving 'security.debian.org'
    Err:4 http://deb.debian.org/debian bookworm-updates InRelease
      Temporary failure resolving 'deb.debian.org'
    

    And here's the content of /etc/resolv.conf:

    # This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
    # Do not edit.
    #
    # This file might be symlinked as /etc/resolv.conf. If you're looking at
    # /etc/resolv.conf and seeing this text, you have followed the symlink.
    #
    # This is a dynamic resolv.conf file for connecting local clients to the
    # internal DNS stub resolver of systemd-resolved. This file lists all
    # configured search domains.
    #
    # Run "resolvectl status" to see details about the uplink DNS servers
    # currently in use.
    #
    # Third party programs should typically not access this file directly, but only
    # through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
    # different way, replace this symlink by a static file or a different symlink.
    #
    # See man:systemd-resolved.service(8) for details about the supported modes of
    # operation for /etc/resolv.conf.
    
    nameserver 127.0.0.53
    options edns0 trust-ad
    search .
    
  24. theCalcaholic commented on Nov 6, 2024

    @theCalcaholic
    Collaborator

    @remz1337 A fix for this issue (along with NC 30 support) is in devel. Can you try running the installer like this?

    BRANCH=devel DBG=x bash <(curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh)
  25. theCalcaholic commented on Nov 8, 2024

    @theCalcaholic
    Collaborator

    Should be fixed with v1.55.3

  26. remz1337 commented on Nov 8, 2024

    @remz1337

    Tested and can confirm the issue is now fixed. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions