App Flarum - Unable to install flarum: An error occurred inside the app installation script

What app is this about, and its version: Flarum 1.8.10~ynh1
What YunoHost version are you running: 12.1.28
What type of hardware are you using: VPS bought online

Describe your issue

I tried to install Flarum in web interface to a subdomain, but the installation ended with an error “Unable to install flarum: An error occurred inside the app installation script”

Is any way how to fix this issue on my side?

Thank you

Share relevant logs or error messages

https://paste.yunohost.org/raw/etizuroxaw

@Muzzug

I don’t know why it does not work, this block of travc indicate a faillure to create a 1G swap.

2025-10-19 12:48:47,317: DEBUG - + ynh_add_swap --size=1024
2025-10-19 12:48:47,317: DEBUG - + declare -Ar args_array
2025-10-19 12:48:47,333: DEBUG - + local swap_max_size=1048576
2025-10-19 12:48:47,334: DEBUG - ++ df --output=avail /
2025-10-19 12:48:47,335: DEBUG - ++ sed 1d
2025-10-19 12:48:47,337: DEBUG - + local free_space=86660224
2025-10-19 12:48:47,337: DEBUG - + local usable_space=43330112
2025-10-19 12:48:47,338: DEBUG - + SD_CARD_CAN_SWAP=0
2025-10-19 12:48:47,338: DEBUG - + ynh_is_main_device_a_sd_card
2025-10-19 12:48:47,339: DEBUG - +++ findmnt / --nofsroot --uniq --output source --noheadings --first-only
2025-10-19 12:48:47,343: DEBUG - ++ lsblk --output PKNAME --noheadings tank/ct/27070
2025-10-19 12:48:47,348: WARNING - lsblk: tank/ct/27070: not a block device
2025-10-19 12:48:47,348: DEBUG - + local main_device=
2025-10-19 12:48:47,349: DEBUG - + echo
2025-10-19 12:48:47,349: DEBUG - + grep --quiet mmc
2025-10-19 12:48:47,349: DEBUG - + return 1
2025-10-19 12:48:47,349: DEBUG - + '[' 43330112 -ge 1048576 ']'
2025-10-19 12:48:47,350: DEBUG - + local swap_size=1048576
2025-10-19 12:48:47,350: DEBUG - + '[' 1048576 -ne 0 ']'
2025-10-19 12:48:47,350: DEBUG - + '[' '!' -e /swap_flarum ']'
2025-10-19 12:48:47,350: DEBUG - + fallocate -l 1048576K /swap_flarum
2025-10-19 12:48:47,351: DEBUG - + chmod 0600 /swap_flarum
2025-10-19 12:48:47,353: DEBUG - + mkswap /swap_flarum
2025-10-19 12:48:47,357: DEBUG - Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
2025-10-19 12:48:47,357: DEBUG - no label, UUID=cd9422af-3483-4545-9524-de85fd7674b2
2025-10-19 12:48:47,357: DEBUG - + swapon /swap_flarum
2025-10-19 12:48:47,359: WARNING - swapon: /swap_flarum: skipping - it appears to have holes.
2025-10-19 12:48:47,360: DEBUG - + ynh_exit_properly
2025-10-19 12:48:47,360: DEBUG - + local exit_code=255

‘swapon: /swap_flarum: skipping - it appears to have holes.’

Might be trying to add swap due to not enough memory ? How much memory does have the VPS ?

When looking for such issues with ‘holes’ in swap there are references of ZFS.
Creation of swap fails because underlying filesystem might not provide a continuous list of blocks
How was yunohost installed ? what are the filesystems ?

this is what yunohost find as root device filesystem

tank/ct/27070

What is that ?

I think this is related to ZFS, yunohost swap creation uses standard swap creation, it seems on ZFS swap creation should be done using zfs tools.

Thank you for your responses.

I think I’ve found the source of the problems. I can’t create a swap within my VPS, so it’s probably crashing because of that.
So it’s an infrastructure limitation; the provider doesn’t allow it. :neutral_face:

So thank you very much for your help. If you guys can figure out a way around this, I’d appreciate it, otherwise I’ll just have to do without. :slight_smile:

Thanks a lot!

Try using this branch and please report back with as much details as you can (vps specs, free mem before install and after install, free disk before and after install using free -h and df -h or duf, neofetch or fastfetch)

yunohost app install https://github.com/YunoHost-Apps/flarum_ynh/tree/noswap
1 Like

Yeah, it worked! Thank you. :slight_smile:

Before installation

muzzug@vps
----------
OS: Debian GNU/Linux 12.12 (bookworm) x86_64
Host: PowerEdge R7525
Kernel: Linux 6.12.48
Uptime: 4 days, 30 mins
Packages: 1205 (dpkg)
Shell: bash 5.2.15
Terminal: cockpit-bridge 287.1
CPU: AMD EPYC 7H12 64-Core (8) @ 2.60 GHz
GPU: Matrox Electronics Systems Ltd. Integrated Matrox G200eWr
Memory: 2.30 GiB / 4.00 GiB (58%)
Swap: Disabled
Disk (/): 37.36 GiB / 120.00 GiB (31%) - zfs
Local IP (venet0): xxx.xxx.xxx.xxx
Locale: en_US.utf8

After installation

muzzug@vps
----------
OS: Debian GNU/Linux 12.12 (bookworm) x86_64
Host: PowerEdge R7525
Kernel: Linux 6.12.48
Uptime: 4 days, 36 mins
Packages: 1207 (dpkg)
Shell: bash 5.2.15
Terminal: cockpit-bridge 287.1
CPU: AMD EPYC 7H12 64-Core (8) @ 2.60 GHz
GPU: Matrox Electronics Systems Ltd. Integrated Matrox G200eWr
Memory: 2.34 GiB / 4.00 GiB (59%)
Swap: Disabled
Disk (/): 37.46 GiB / 120.00 GiB (31%) - zfs
Local IP (venet0): xxx.xxx.xxx.xxx
Locale: en_US.utf8

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.