Install Nextcloud on Ubuntu

Hi, I’ve been trying to install Nextcloud on Ubuntu but I can’t. I use the recommended commands to no avail. I tried some suggested commands to see what the logs say and I’m sure there is a error message there. Can someone help me debug or resolve this issue?

what commands exactly ? you need to be a bit more specific …

what i do to install nextcloud is:

sudo snap install nextcloud

… wait a few minutes for it to create the databases and all (it takes a bit) …

then point my browser to http://<ip of the machine i installed nextcloud on>/ and click the “finish installation” button on that website which guides me through the process …

What commands? The one one you mention with sudo and I tried that wo/sudo as prefix.
Other commands: ones to show errors or logs.
It is installed but the daemon isn’t loading, this may be the only problem.
Can you recommend some troubleshooting steps and take it from there?

well, lets start with the full output of snap version to show us what system you are on …

all snap logs go to the systemd journal, just a journalctl and searching for netxcloud should show you the log messages …

Version output:
snap 2.49.2
snapd unavailable
series -

I modified the second command to one I tried yesterday since your one’s results appeared unsuitable.IS the following useful?

1]: snapd.service: Scheduled restart job, restart counter is at 2.
1]: Stopped Snap Daemon.
]: Starting Snap Daemon...
]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus, network
]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus, network
]: cannot run daemon: cannot read state: invalid character '\u0089' looking for beginning of value
]: snapd.service: Main process exited, code=exited, status=1/FAILURE
: snapd.service: Failed with result 'exit-code'.
]: Failed to start Snap Daemon.

so your system is definitely not ubuntu

that output should look something like:

$ snap version
snap    2.50.1
snapd   2.50.1
series  16
ubuntu  20.04
kernel  5.8.0-55-generic

what is your OS exactly ?

this is also definitely not an ubuntu kernel

I am on Ubuntu 20.04. I got some new hardware recently, maybe overcoming a compatibility glitch caused this discrepancy.

if you were on ubuntu 20.04 you’d see a similar output to mine …
you are using some broken kernel and snapd can not properly start …
changing hardware on ubuntu does normally not cause the software to misbehave or installs a broken kernel package … (even replacing the mainboard and disks here on my desktop PC does not cause such a misbehaviour)

Maybe that was a different thing.
$ uname -r
a command for checking the Linux kernal returns:
5.11.11-051111-generic

yeah, this is definitely not an ubuntu kernel … the ubuntu kernel comes with the linux-generic package as a dependency and is installed on all ubuntu releases by default …

Your wrong. See: ubuntu mainline kernal link

The wiki page to these kernels is:

Quoting from the page:

These kernels are not supported and are not appropriate for production use.

They are solely for verifying fixes if a kernel team member asks you to in a bug report … they should not be used on a daily basis, are not updated and are not supported or supportable in any way … and lack a large amount of security patches (due to which for example snapd does not work).

Install a supported kernel, if the one coming with linux-generic is too old for you, you can use the hwe kernel linux-generic-hwe-20.04, that will install a newer supported kernel …

Hello.
do they update themselves? or need to restart? please tell me, I’m not quite good at this.

linux-generic and linux-generic-hwe-20.04 do update themselves when there are updates in the archive …

if you install or update a kernel you always need to restart, a proper ubuntu install will tell you about it (either at login time if you log in via terminal or through a desktop popup if you log in grapically)

What does the command lsb_release -a outputs ?

Here’s what it gives me on Ubuntu 20.04 :

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

I get the same output, Yannick.

well, that only means that /etc/lsb-release comes from an ubuntu package (also note that nowadays /etc/os-release is used over lsb), this does not change that fact that you run an unsupported/unsupportable kernel, regardless if the root filesystem is coming from ubuntu packages or not … just switch to a supported ubuntu kernel and snapd will work …

5.8.0-55-generic 5.8.0-55.62~20.04.1 amd64 Signed kernel image generic

generic-hwe-20.04 5.8.0.55.62~20.04.39 amd64 Generic Linux kernel image
Slow getting through this but here’s a update. I think both of these came with the hwe install and the former is in use now but I still get the same problem. I think the latter is recovery mode only. Will doublecheck.

well, check if snap version starts ouputting sane data …
also you need to perhaps delete your state file in /var/lib/snapd/state.json to have it freshly generated at the first proper start of snapd …

snap    2.49.2+20.04
snapd   unavailable
series  -

How do I open the directory for that file?