Monday, 18 July 2016

Install Cura 2.1.2 on Fedora 23/24

Unfortunately for Fedora users Ubuntu is more popular which means packages that don't make it into repos often aren't available as RPM's but are sometimes available as DEB's, this was the case with Cura slicer from Ultimaker.

Luckily DEB's can be converted to RPM's with a package called Alien which can be installed through DNF.

Download your preferred version of Cura, I wrote this guide around the recently release version 2.1.2.

Install Alien:
# dnf install -y alien

Convert the DEB to RPM:
# cd ~/Downoads
# alien -vr Cura-2.1.2-Linux.deb

Unfortunately at this point the RPM won't install successfully so it needs to be modified:
# dnf install -y rpmrebuild

Fix the RPM:
# rpmrebuild -pe cura-2.1.2-2.x86_64.rpm

After a short time rpmrebuild will open a file in vi, the below lines need to be removed (move cursor to appropriate line with arrow keys and press the d key twice):

# /opt can be found at the top of the %dir list:
%dir %attr(0755, root, root) "/opt"

# the remaining lines are at the bottom of the file:
%dir %attr(0755, root, root) "/usr"
%dir %attr(0755, root, root) "/usr/bin"
%dir %attr(0755, root, root) "/usr/share"
%dir %attr(0755, root, root) "/usr/share/applications"

Fedora 24 note:
If you are using Fedora 24 you will also need to remove this line and create a symlink, Fedora 24 shipped with Python 3.5 but Cura was built for Python 3.4, this step is not needed for Fedora 23:

Now save and exit, press the : key then type wq and press enter (:wq), rpmrebuild will now now prompt to continue, press Y to build the modified RPM file.

Once rpmrebuild has finished building the new RPM it will return the location of the new RPM:
result: /home/user/rpmbuild/RPMS/x86_64/cura-2.1.2-2.x86_64.rpm

Fedora 24 note:
Before installing create a softlink to a file Cura will be expecting to find but doesn't exist, this step is not needed for Fedora 23:
# ln -s /usr/lib64/ /usr/lib64/

You can now install the new RPM using DNF:
dnf install '/home/user/rpmbuild/RPMS/x86_64/cura-2.1.2-2.x86_64.rpm'

And that should be it, run Cura from the Applications menu and if all went well it will open just fine.

No comments:

Post a Comment