Friday, August 3, 2012

Slic3r on Raspberry Pi

Installing Slic3r on Raspberry Pi

After installing PrintRun on my RPi, I wanted to get a slicing software running.  Skeinforge is written in Python so I'm sure it would install pretty easy.  The problem is Skeinforge is so slow at slicing.  Even on my normal computer, it takes at minimum a couple minutes to export G-Code for an STL that would take a few seconds on Slic3r.  

Note:  Slic3r is fast and for the majority of slicing that I do, it works flawlessly.  Unfortunately it is still in it's infancy for certain features, such as support material.  Therefore, Skeinforge is a necessary evil you will likely eventually need.  


I followed these install instructions for the most part.  Another fellow Reprap-er anwe79 suggested a few more needed dependencies to get it up and going.  I will list the full install process to make it easier.  


sudo apt-get install git build-essential libgtk2.0-dev libwxgtk2.8-dev libwx-perl libmodule-build-perl libnet-dbus-perl
sudo apt-get install cpanminus
This next part may not be needed but just go ahead and make sure you have them:
sudo apt-get install curl
curl -L | perl - --sudo App::cpanminus

Next is the extra needed dependencies that aren't listed on the original tutorial:
sudo apt-get install libextutils-cbuilder-perl
sudo apt-get install gcc-4.7
sudo apt-get install g++-4.7
Now you will be ready to go forward and get Slic3r:
git clone
cd Slic3r
Now you need some misc. perl dependencies:
sudo apt-get install libwx-perl
This next part installs some dependencies through cpanm.
sudo cpanm Boost::Geometry::Utils Math::Clipper \
    Math::ConvexHull Math::Geometry::Voronoi Math::PlanePath Moo Wx
NOTE: This will take forever! Just press enter and let it go. Don't mess around. After you get back to the main terminal prompt, scroll back through and check for errors. If you see errors then you need to check out the build log. Insert the correct build.log directory, should be something like /root/something/build.log

sudo nano buildLogDirectory
This will open the build log in nano and you can see where the problem is. For example it may say gcc-4.7 not installed. Therefore other dependencies won't install either.
Note: At times when installing dependencies, you'll need to update. Watch the terminal, it'll tell you when to update. Feel free to reboot whenever you'd like. Just remember to cd back to Slic3r when you return to the terminal like above.
At the end of all of this, you should have a working Slic3r. You can navigate through a file manager to the Slic3r folder and find and execute or you can type ./ in terminal.
Once again, I'm not expert, this is simply the way I got it working on my RPi. Once again follow along to the RepRap developers forum topic here. Good Luck!


  1. thank you for posting this. I was able to successffuly setup my pi for printing

  2. I was able to get Slic3r running on my RaspPi using your tutorial. The newest version of Slic3r (0.9.8-dev) also required Math::ConvexHull::MonotoneChain to be installed.


  3. One other note on the Slic3r install... The Wx install fails if done on an SSH term or under VNC; it must be done on the local desktop in X or it will fail. It was giving me errors about "DISPLAY not being set correctly" and "failed to start gtk" until I did it on the local desktop. Hope this helps someone...

    1. Ive used this little trick to get around that issue, just post this into command line and any program that tries to open will open into the main desktop on the rpi/linux computer.

      "export DISPLAY=:0"

      just paste that without the quotes into the ssh terminal window.

  4. I can confirm that Wx needs to be installed on the real x desktop. Can't be done via SSH or VNC :)

  5. I Chris,

    I'm a fisrt time user of linux and raspberry.

    I'm using the folloing Raspbian “wheezy” OS version:
    Linux 3d-printer-rpi 3.6.11+ #456 PREEMPT Mon May 20 17:42:15 BST 2013 armv6l GNU/Linux

    I've followed the instructions for PrintRun (which run ok) and now slic3r. I've got a problem with Wx. I've getting a compilation error on the log file. I'ts necessary any change? can you provide any help?

    best regards

  6. I am trying to install this on my pcDuino which runs Ubuntu. I get to the command:

    sudo apt-get install libextutils-cbuilder-perl

    and am hit with:

    ubuntu@ubuntu:~$ sudo apt-get install libextutils-cbuilder-perl
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libextutils-cbuilder-perl : Depends: perl but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

    But Perl is already installed, I have checked! Anyone hand an idea on how to correct this?