I found a thread describing the same problem but it is now locked and there was no solution. This is the thread:
I have a solution. The problem was that many attempts to install Roon Server with the Easy Installer on freshly installed Ubuntu Linux ended with this:
Do you want to install RoonServer on this machine? [Y/n] y
Downloading RoonServer_linuxx64.tar.bz2 to /tmp/tmp.6qHIqqbwuQ/RoonServer_linuxx64.tar.bz2
Warning: Failed to open the file
Warning: /tmp/tmp.6qHIqqbwuQ/RoonServer_linuxx64.tar.bz2: No such file or
Warning: directory
curl: (23) Failure writing output to destination
The RoonServer installer did not complete successfully.
curl couldnāt write the file to the temporary directory. It couldnāt even start writing. I tried changing the temp directory by modifying the script but always got the same error. I googled for solutions (thatās how I found the thread I linked above) until I stumbled upon this very surprising unusual solution:
Basically snap curl is useless. Uninstall it properly. Get the proper apt curl, and everything works like a charm.
$ sudo snap remove curl
$ sudo apt install curl
Thatās what I did, then closed and opened a new terminal window (important!) and Roon Server successfully installed. I am still in shock that Ubuntuās installed by default curl is āuselessā.
It was no Roonās fault but maybe @support can put a note about this on the Installing Roon on Linux web page?
I was pulling my hair out trying to find out what was wrong.
P.S. I donāt agree with @Martin_Webster 's edit of my post. He added the word āServerā to the title. However, my post applies to any type of Roon installation on Ubuntu (there are only two - server and bridge). The bridge installer script is practically the same and also calls curl, so it will have the same issues. By adding āServerā we leave out Bridge.
Fair enough. However, the text of your post, and the linked thread, only refer to Roon server. Moreover, I wanted the subject to Make it clear the topic didnāt cover Roon control (GUI) since you posted in #roon:linux not #support
Interestingly, Iāve never experienced this issue, and the following steps continue to work for me. But, as you can see, I always install Curl using apt since it isnāt installed on Ubuntu server by default.
Were you, by chance, installing Roon Server, without SU privileges?
Bill_Janssen
(now wearing snowshoes on my asymmetrical isolation feet)
#4
Iām a little confused as to why you would even have /snap/bin/curl installed, and why it would precede /usr/bin/curl on your path. My ubuntu box with 22.04 doesnāt have the curl snap installed, and does have /usr/bin/curl (installed via apt).
Does the Roon installer for Linux install snap curl? (I checked: no)
Good points, but this should still work if/snap/bin is included in PATH. The error seems to suggest thar curl doesnāt have permission to write in /tmp, but Iād hazard a guess that the script is run outside user space.
I can confirm that installing curl using snap causes issues when trying to install Roon (server and/or bridge), at least on Ubuntu 22.10. Using apt instead solved these issues.
Did you mean Roon Bridge? In my postscriptum I added Roon Bridge to the topic as the script for it is the same (just a different downloadable package), so the effect should be same.
No, no chance. Even if i was a total noob I would have copied the commands from the instructions https://help.roonlabs.com/portal/en/kb/articles/linux-install and they so include sudo (and thatās what I actually did as I didnāt want to mistype).
I donāt know. I installed a fresh Ubuntu 22.04.1 LTS desktop 2 days prior. I am not a Linux aficionado, I donāt use it every day but I manage several headless Raspberry Piās and my last experience with a Linux desktop was years ago (RedHat). I am familiar with the system but I am not a guru.
My install did not have /usr/bin/curl and I have /snap/bin last in my PATH. I suppose /snap/bin/curl was installed (I didnāt install it). When I did
sudo snap remove curl
it was uninstalled.
My wild guess is that Snap installed it automatically. I remember when I installed Ubuntu I discovered Snap in the GUI, and I installed and uninstalled one app just to see how it worked. I suppose Snap needed curl for this and installed it behind the curtains.
As I mentioned I tried changing the temporary directory to various places outside /tmp (the script uses āmktempā and I just hardcoded some directories by modifying the script) and it didnāt help, so itās not related to the sticky bit.
Can anyone explain how running this script with sudo didnāt allow this script or that Sanp curl write the file wherever I wanted? I am not an expert but I thought that sudo was supposed to give god privileges to the system.
As an afterthought, I donāt think it matters but maybe, I installed Ubuntu on ZFS filesystem.
Can anyone (moderators) encourage the Roon staff to add a note about this issue to the Linux installation instructions? I tagged support but it seems unresponsive. I have another thread in the Support forum about a different matter and no one responded in a month. Threads get locked. It looks like there are two locked threads about this issue. One is without a solution and I found it by googling, the other has a solution but I didnāt find it. I am not the only one who had this problem and I am sure someone else will have it in the future. Although, itās not a Roon problem.
ZFS makes no difference. The mktemp command creates a temporary file in /tmp, and Snap doesnāt have access to this folder. Instead, a special temporary folder is used with Snap. The only practical solution, if Snap is used, is to create the temporary file in user space.
Ubuntu Server does not install Curl by default using Snap. I agree that itās nor a Roon issue.
I think I tried using some directory in my home directory as temporary by substituting TMPDIR=`mktemp -d` with TMPDIR=/home/myuser/somedir as I tried several different places all to no avail.
Ubuntu Server installs fewer packages than Desktop that I installed but I see that Desktop doesnāt install Snap curl either. I donāt know how it got installed on my machine, probably by my exploring of Snap. And I thought curl comes as part of the system. Now I realize that this situation is not common as curl is neither part of the system nor comes Snap-preinstalled.
I found that the developer of Snap curl knows about the issue:
They should remove curl from Snap if it causes problems.
I still donāt understand why a script run under sudo could not write to a temporary directory be it āSnappedā curl or not. I guess I am missing something in my UNIX knowledge about sudo.
And another request for Roon developers: use wget instead. It comes with the system and does the same in this case. I didnāt install it and I have it in /usr/bin.
Iām not a snap expert at all but I think snaps are restricted to specific paths or use virtualized paths like in the /tmp example in your link, regardless of who runs them, a user or root
If you have music stored on a USB drive, do this to auto mount:
Use blkid to discover your USB UUID reference (write this down)
$ blkid
Then edit fstab
$ sudo nano /etc/fstab
Add this line to your config file (inserting your drive UUID), at the end on the text:
UUID=insert your drive UUID here /media auto nosuid,nodev,nofail 0 0
Exit and save, CRTLX, Yes
Then run
$ sudo blkid /dev/sdb2 | awk -Fā"ā ā{print $2}ā
Activate NUC top power button for instant soft off (On works by default):
$ sudo hostnamectl set-chassis vm
Reboot PC and use Roon remote to access Core
$ sudo reboot now
Did you need to install curl? People say itās not installed by default. If so, perhaps this instruction should go on top.
And I think you donāt need to install bzip2 because itās never used by the script. tar is used to unpack the package and I believe tar is part of the system
If the developers replace this line in the script curl -L -# -o "$TMPDIR/$PACKAGE_FILE" "$PACKAGE_URL"
with this wget -O "$TMPDIR/$PACKAGE_FILE" "$PACKAGE_URL"
threads like this and peopleās troubles installing Roon would not exist. wget is installed by default (part of the system?).