How-To guide for installing linuxcnc on Virtual Box ( without buildbot)

29 May 2018 21:22 - 29 May 2018 21:33 #111288 by Marcodi
After 12 hours of desperate trying to get linuxcnc ( Axis ) to work in VirtualBox i decided to write a how-to to help other newbies just like me.

Easy guide for installing linuxcnc on virtual box, thanks to information found on the forum.

Very few steps actually needed. Forget about buildbot and such and dependencies and all of that, cause it will drive you crazy, and so it did drove me.

Step 1 . Download and Install Virtual Box, pretty easy youtube videos all around

step 2. Download a linux distribution. ( I have chosen and i recommend you to do the same, to simply take Debian Stretch. Whatever you do, don't try linux Mint any of the versions, Axis doesn't work and all the info on the forum to fix it is no longer there ( links and readme files ) Just make it easy on yourself!!

Download it to your computer.

Step 3. Install linux in this virtual box.

During install, do not set a superuser password!!!! I couldn't get su to work and sudo doesn't work than, meaning i had to reinstall stretch to have sudo. You do have to set a user password, but that is fine.

Step 4. Open the virtual box and your linux.

Step 5.

Now comes the godly part after 12h of trying. Surf to from there surf to the linux you are using and than look for example using stretch for following file

(just copy the link location to your clipboard, you are going to need it next.)

This gives you an idea of how the link should be looking like. You can choose also to install 2.7 version or any other version you find there. I know now that the uspace will work in the virtual box and axis and sim work. just copy the link you need to your clipboard

step 6. Open a terminal in debian stretch ( inside virtual box )

Just type following ( i didn't write this, just found it on the forum ) ( the $ sign is actually the last symbol you see of your command line , so you don't have to type it)

$ wget
(this wget is followed by the link you searched for earlier, to paste it you simple do ctrl-shift-v after you wrote wget )

next you write
$ ls
(this should return some things but also this should be there, well at least the one you selected. )

next you write:
$ sudo dpkg -i linuxcnc-uspace*.deb
This will probably, well definitely, fail, but that is ok cause now you write the following:
sudo apt-get -f install
( this will install all dependencies )

next you write:
dpkg -l linuxcnc\*|grep ii ( this is an L there after the dash )
this will return something like this:
ii linuxcnc-uspace 1:2.8.0~pre1.1082.gaa37cb0 amd64 PC based motion controller for real-time Linux

next you write:
$ which linuxcnc
returning this: /usr/bin/linuxcnc

now you type:
$ linuxcnc

And oh my god, it works and boots and doesn't give any issues whatsoever.

( Rectifying something, i believe when i started on stretch, i think there were a few dependencies i didn't have when i start writing the first steps, but these were stretch things and nothing to do with linuxcnc. I solved them by typing every time sudo apt-get install (and than whatever name it returned me not having )

For most of you this will be a good laugh, but trust me for a newbie, this guide is gold ;))))))

Hope it helps: By the way linuxcnc forum, it may be an idea to get working how-to guides a dedicated place on the forum. Like virtual box is important, many first time linuxcnc users who want to get the feeling, can easily install this and have a look at linuxcnc and its capabilities. The complexity to get it running is scaring an enormous amout of people away.
Last edit: 29 May 2018 21:33 by Marcodi.
The following user(s) said Thank You: Mike_Eitel

Please Log in or Create an account to join the conversation.

29 May 2018 22:00 #111291 by InMyDarkestHour
Are you saying you can't compile Linuxcnc on Mint-18.1 ? I've had no trouble from what I can remember.

The Mint guide is still there, are you saying it's not ?

I've installed Linuxcnc in virtualbox using the official 2.7 iso and the Linuxcnc stretch user space iso.

Please Log in or Create an account to join the conversation.

29 May 2018 22:05 #111292 by Marcodi
Hi ozzy,

This guide only applies to virtual box!!!

I have a running mint installation controlling the machine. But mint and virtual box don't work together for the axis screen. There is an opengl problem. And after searching for 10 hours I gave up and super simple installed following above guidelines. Cause buildbot was given me tons of misery aswell on Debian stretch. This install way worked in. Few seconds I had it up and running. Believe me after 10 hours that guide is worth gold! :)

Please Log in or Create an account to join the conversation.

29 May 2018 22:12 #111293 by InMyDarkestHour
What's wrong with installing the official 2.7 iso in virtual box and then doing a dist-upgrade to get to version 2.7.13 as that's the stable version ? Axis runs ok for getting a feel. I even installed ropbox and got that to work from inside a VM.

I found something interesting yesterday, I've been playing with Salix-14.2 which uses xfce desktop, on the machine I was using with a preempt kernel I was getting the "realtime error" when running a latency test....I switched the desktop enviro to LXDE and bang the issue disappeared (enough to do software step gen) .....need to do more testing

Please Log in or Create an account to join the conversation.

29 May 2018 22:47 #111296 by Marcodi
That might work all fine but it is not version 2.8.0 and that's the one we all need. Gantry machines , joints-axis seperated, robots, ... so that's why a short explanation on getting 2.8 to work in virtual box.

Please Log in or Create an account to join the conversation.

30 May 2018 04:14 #111302 by InMyDarkestHour
Just confirmed using this iso:

The deb you linked to can be installed and tested. I installed the dev package as well and only had to add python-serial

For a quickie you can run the live image in VirtualBox and install the deb package but all with be lost on a reboot of the virtual machine. This is the way I went, just to test.

Please Log in or Create an account to join the conversation.

14 Dec 2023 01:17 #288086 by seuchato
Hi all
I just installed LCNC 2.8.4 and 2.9.2 using the latest available iso's as downloadable from under Opensuse Leap 15.5 host and virtualbox. Latency is horrible, it throws an unexpected real time error, other than but axis LinuxCNC demo runs fine.
Certainly *NOT usable for machine controllling*, but nice to test out other things.

Please Log in or Create an account to join the conversation.

Time to create page: 0.125 seconds
Powered by Kunena Forum