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
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?
(now wearing snowshoes on my asymmetrical isolation feet)
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 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.
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?).