[Home]Installing EMC2

EmcKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Search:

Contents

1. Precompiled EMC2 for Ubuntu
1.1. Installing from the EMC2 Ubuntu Live CD
1.2. On Ubuntu 8.04 using precompiled EMC2 packages
1.3. On Ubuntu 6.06 using precompiled EMC2 packages
1.4. Debs of recent git versions
2. On Ubuntu 6.06 or 8.04 from source
2.1. Preparing Ubuntu to compile emc2
2.1.1. On "Stock" Ubuntu
2.1.2. On Ubuntu with EMC2 package already installed
2.2. Getting the source with git
2.3. Getting the latest updates with git
2.4. Pre-requisites for Ubuntu 9.10
2.5. Building emc2 (realtime)
2.6. Building emc2 (simulator)
2.7. Building emc2 (with documents)
2.8. Running emc2
2.9. Reconfiguring emc2
2.10. Building EMC and a custom kernel
2.11. Building EMC with Ubuntu 9.10 SMP for an Atom Dual Core CPU
3. On Debian
3.1. Debian Lenny compile RTAI
3.2. Debian Lenny compile EMC2
3.3. Debian Etch compile RTAI
3.4. Debian Etch compile EMC2
3.5. Debian Etch Server and Diskless EMC2 Thin Clients
3.6. Debian Sarge compile EMC2
3.7. Simulator on Debian Sarge
4. Other ways of getting the source code
4.1. Tarballs
4.2. apt-get
4.3. without an internet connection
4.4. without an internet connection BUT you have a working RunInPlace dir on another machine AND a usb drive
5. Preparing other versions of Linux to compile emc2
5.1. BDI4
5.2. BDI-Live, BDI-TNG, BDI2
5.3. RTAI from scratch
5.4. Simulator on Ubuntu 9.04
5.5. Compiling EMC2 in a `simulator' mode on Ubuntu or Kubuntu 8.04 or 9.04
5.6. Simulator on other versions of Ubuntu
5.7. Realtime on 64-bit systems
6. Nvidia Card configuration issues
7. Uninstalling EMC2 from source

1. Precompiled EMC2 for Ubuntu

1.1. Installing from the EMC2 Ubuntu Live CD

If you do not already have a Linux system, then you can install Ubuntu Linux and EMC2 at the same time. Just download the [EMC2 Live CD]. If you use this method, you don't need to read the rest of this page; just start Using EMC2. You can also use the CD to Install to CompactFlash.

1.2. On Ubuntu 8.04 using precompiled EMC2 packages

If you have already installed Ubuntu 8.04 "Hardy Heron", you can install emc2 without reinstalling your whole system. Simply download and run the installation script:

 http://linuxcnc.org/hardy/emc2-install.sh

Then follow the instructions on [Installing EMC2]. If you use this method, you don't need to read the rest of this page; just start Using EMC2.

If all you want to do is run EMC2, you can stop reading this page now! The instructions above give you a standard, released version of EMC2, which is what most users have. It is the version with the best support from manuals, the mailing list, and the IRC channel.

If you want to compile additional components for EMC2, you can stop reading this page now! You do not have to recompile emc2 just to add components. For instructions on adding components, read [How to compile and install a component].

1.3. On Ubuntu 6.06 using precompiled EMC2 packages

If you are doing a new installation, do not choose Ubuntu 6.06. Use Ubuntu 8.04 instead. Starting with emc 2.4.x, emc2 updates will not be available for Ubuntu 6.06.

If you have already installed Ubuntu 6.06 "Dapper Drake", you can install emc2 without reinstalling your whole system. Simply download and run the installation script:

 http://linuxcnc.org/dapper/emc2-install.sh

Then follow the instructions on [Installing EMC2]. If you use this method, you don't need to read the rest of this page; just start Using EMC2.

If all you want to do is run EMC2, you can stop reading this page now! The instructions above give you a standard, released version of EMC2, which is what most users have. It is the version with the best support from manuals, the mailing list, and the IRC channel.

If you want to compile additional components for EMC2, you can stop reading this page now! You do not have to recompile emc2 just to add components. For instructions on adding components, read [How to compile and install a component].

If you want to compile emc2 yourself, or wish to install on a different distribution than Ubuntu, continue reading. First, the instructions for compiling the "git" version on Ubuntu are explained. Then, pointers to information about other Linux distributions and other ways of getting the source are given.

If you have all ready installed EMC from the Live CD use only --enable-run-in-place option with ./configure or uninstall EMC first

1.4. Debs of recent git versions

Precompiled packages of the most recent software in our [EMC2 git] repo are automatically built, and are available to be installed. The set of available packages and instructions on how to use them are available here on the [EMC2 buildbot].

2. On Ubuntu 6.06 or 8.04 from source

2.1. Preparing Ubuntu to compile emc2

Note: The following sections use the program "apt-get" to install software and "git" to download source code to your computer. Once you have installed a software package or used git clone, you do not need to repeat that step to build a new version of EMC2. You will be notified of available updates for any installed software. See the section "Getting the latest updates with git" to see how to get the latest emc2 source code.

2.1.1. On "Stock" Ubuntu

You can skip this section if you have already installed EMC2 and the realtime kernel, or if you installed from a LiveCD? downloaded from the linuxcnc.org website. If you wish to build emc2 from source, follow the steps given below. Indented text that looks
 like the text on this line
is text that you type into the terminal or editor window.

First enable the universe repository (for lyx-qt, libpth-dev, and possibly other packages) [as explained here] if it is not already enabled.

You need to add the linuxcnc repository to your /etc/apt/sources.list. You may follow the last part of the [basic instructions] to do this or simply do (the following will also install emc2):

 # For Ubuntu Hardy Heron (8.04)
 wget http://www.linuxcnc.org/hardy/emc2-install.sh
 chmod 755 emc2-install.sh
 ./emc2-install.sh

 # For Ubuntu Dapper Drake (6.06)
 wget http://www.linuxcnc.org/dapper/emc2-install.sh
 chmod 755 emc2-install.sh
 ./emc2-install.sh

Ubuntu will ask you for your root password in order for the emc2-install.sh script to modify /etc/apt/sources.list and install the new required packages. At this point, you must reboot and select the rtai kernel from the grub bootloader menu. Then, continue with the next step.

2.1.2. On Ubuntu with EMC2 package already installed

Use apt-get to install additional packages required to rebuild emc2 from source:
 sudo apt-get build-dep emc2
 sudo apt-get install build-essential autoconf
If you get an error like this one:
 Package libpth-dev is not available, but is referred to by another package.
 This may mean that the package is missing, has been obsoleted, or is only available from another source
 E: Package libpth-dev has no installation candidate
then you have not configured apt correctly and the compilation step will fail.

2.2. Getting the source with git

EMC2 source is stored in a system called Git. If you plan to make changes to emc2, it's highly recommended to use this method. With git, you can maintain your changes over time while getting bugfixes and new features. Git also makes it easy to submit your improvements to the linuxcnc.org team for inclusion in future versions of the software.

First, follow the steps above to get the extra packages needed to compile emc.

Before you can get a copy of EMC2 from our git server you will need to install the git program:

 sudo apt-get install git-core gitk git-gui

Once you have installed git, you will use one of the following forms of the git clone command:

 git clone git://git.linuxcnc.org/git/emc2.git emc2-dev
This puts the project in the directory 'emc2-dev'. To put the local copy of the project in a different location, just change the last argument of the 'git clone' command. Git will download about 37MB of data and it takes about 7 minutes to complete. You should only have to do this once.

The commands below generally assume you are inside the emc2-dev directory.

By default, you will get files from "master", which is the name for the branch where new feature development takes place. If you want to track another branch,

 git branch --track v2.4_branch origin/v2.4_branch
 git checkout v2.4_branch
(For branches before v2.4_branch, use the form v2_3_branch instead)

To get a particular version of emc, use

 git checkout vX.Y.Z
For instance, to get released version 2.3.0, use
 git checkout v2.3.0

Note that if you use an tag for a specific release, you will never get any updates since the tag specifies a particular snapshot of the files. Using a branch tag, such as "v2.4_branch", will continue to get changes as long as that branch is being developed.

Git has more instructions, such as how to update your version of emc2 after other developers have made improvements.

2.3. Getting the latest updates with git

Assuming that you already have a checkout from git,
 git pull --rebase
If you have made changes locally, then before doing this step you must "git commit" or "git stash" them. For more information, see Git.

2.4. Pre-requisites for Ubuntu 9.10

Just some extra packages to install prior to compiling from scratch.

 $ sudo apt-get install libpth-dev tcl8.5-dev tk8.5-dev bwidget libxaw7-dev libreadline5-dev python-dev libglu1-mesa-dev libxinerama-dev autoconf python-tk libglib2.0-dev libxft-dev gettext

2.5. Building emc2 (realtime)

If you have already installed EMC from the Live CD use only --enable-run-in-place option with ./configure or uninstall EMC first.

(If you uninstall the CD version of EMC you will lose the Applications - CNC menu and the items under it.)

Run these commands in the directory created by git above (usually emc2-dev):

 $ cd src
 $ ./autogen.sh       
 $ ./configure --enable-run-in-place
 $ make 
 $ sudo make setuid

the make command may take several minutes to complete.

2.6. Building emc2 (simulator)

Run these commands in the directory created by git above:
 $ cd src
 $ ./autogen.sh      
 $ ./configure --enable-run-in-place --enable-simulator
 $ make

the make command may take several minutes to complete.

2.7. Building emc2 (with documents)

Run these commands in the directory created by git above:
 $ cd src
 $ ./autogen.sh      
 $ ./configure --enable-run-in-place --enable-build-documentation
 $ make
 $ sudo make setuid

When I ran this with 2.4 pre I was missing the package dvipng. I just used the synaptic package manager to install them.

or to just create the PDF documents and no HTML documents

 $ ./configure --enable-run-in-place --enable-build-documentation=pdf
 $ make

the make command may take several minutes to complete.

2.8. Running emc2

In the top directory that you placed the source, run
 $ . ../scripts/emc-environment
 $ emc
and choose a configuration file from the list, or specify one on the command line:
 $ scripts/emc configs/sim/sim.ini
If you get an error like
 Realtime system did not load
then stop the rtai with
 $ halcmd unloadrt all
 $ halcmd stop
then start again. Sometimes the first load will clear up an issue...

2.9. Reconfiguring emc2

If you compile for realtime in a directory tree (git checkout), and then later reconfigure for --enable-simulator, you must do

 $ make clean
to get rid of the realtime object files. The same applies when switching from simulation to realtime. This is because "make" doesn't know that you've changed modes. It only sees that the object files are newer than the source, and thinks they don't need to be recompiled.

Another potential problem when switching from realtime to simulation is environment variables. The command

 $ . scripts/emc-environment
sets some environment variables in your shell to point to various parts of the run-in-place code. Some of those variables are different for realtime vs. simulation. If you switch modes, you should close the shell you were using, open a new one, and run
 $ . scripts/emc-environment
before starting EMC from that shell.

The same issues can arise if you have multiple git checkouts and switch between them using the same shell. If you are switching between versions or checkouts, it is best to use one shell for each one.

2.10. Building EMC and a custom kernel

Instructions for building a custom kernel and rtai configuration and then compiling EMC for that kernel is on its own page: EMC With Custom Kernel

2.11. Building EMC with Ubuntu 9.10 SMP for an Atom Dual Core CPU

Step by step instructions, from bare metal to working system; compiling a custom Ubuntu 9.10 kernel with SMP, with rtai and EMC2: EMC Ubuntu91

3. On Debian

3.1. Debian Lenny compile RTAI

Instructions for compiling RTAI in Debian Lenny are on their own page: Debian Lenny Compile RTAI

3.2. Debian Lenny compile EMC2

Instructions for compiling EMC2 in Debian Lenny are on their own page: Debian Lenny Compile EMC2

3.3. Debian Etch compile RTAI

Instructions for compiling RTAI in Debian Etch are on their own page: Debian Etch Compile RTAI

3.4. Debian Etch compile EMC2

Instructions for compiling EMC2 in Debian Etch are on their own page: Debian Etch Compile EMC2

3.5. Debian Etch Server and Diskless EMC2 Thin Clients

Instructions to prepare a system with a Debian Etch Server and many diskless EMC2 thin clients are on their own page: Debian Etch Server And Diskless EMC2 Thin Clients

3.6. Debian Sarge compile EMC2

Instructions for Debian Sarge are on their own page: Debian Sarge Compile EMC2

3.7. Simulator on Debian Sarge

Install the packages required to build and run emc TRUNK:
 $ su -
 # apt-get install build-essential fakeroot git-core gitk git-gui libgtk2.0-dev libgnomeprintui2.2-dev  \
tk8.4-dev python2.4-dev python-numarray-ext libpth-dev bwidget xlibmesa-gl-dev \
xlibmesa-glu-dev libreadline5-dev libxmu-dev python2.4-tk # exit

Get the source code for emc 2.2.0 or newer using any method described above.

Configure and build:

 $ cd emc2-trunk/src
 $ ./autogen.sh   ;# (not required on v2_3_branch and earlier)
 $ ./configure --enable-simulator --enable-run-in-place --with-python=/usr/bin/python2.4
 $ make

If all looks well, test drive it:

 $ ../scripts/emc ../configs/sim/axis.ini

It appears that Debian Sarge does not have python2.4-numarray-ext or python2.4-imaging-tk. Without these packages, at least the "image-to-gcode" filter program will not work.

4. Other ways of getting the source code

4.1. Tarballs

Released Versions

Released versions of emc2.3 and newer are [available from http://linuxcnc.org/hardy/dists/hardy/emc2.3/source/ the package server].

Released versions of emc2.2.x and older are available from the [SourceForge download area].

Development Versions

Use Git to follow development of emc2.

4.2. apt-get

If you are using Ubuntu, you can get the source with 'apt-get source emc2'. More on building the debian packages from source is at BuildingUbuntuPackages.

4.3. without an internet connection

This section is completely untested and very complicated! If you find something obviously wrong, please fix it.

You can install emc2 packages offline, provided that you have access to a machine on the internet at some point, such as at a web-cafe for example. The variable $USBKEY should point at the location of your transfer media on both computers, for example:

 export DISK = /media/usbdisk

First, make sure the file /etc/apt/sources.list on the connected machine contains the emc2 repository. This is normally done by running the "install.sh" script at the top of this page. Then get the repository information describing what files are available:

 sudo apt-get update
 cd /
 tar -Pzcf $DISK/lists.tgz /var/lib/apt/lists

the file "lists.tgz" is fairly hefty - around 10-20MB usually. now expand it to the right location in the offline computer:

 cd /
 sudo tar -zxf $DISK/lists.tgz

now it's time to get the list of packages the offline computer needs to run emc2. (on the machine without internet):

 apt-get -y -qq --print-uris install emc2 | awk '{print $1}' | sed "s/'//g" > package_list

You can also add the packages needed to compile emc2 to this list, like so:

 apt-get -y -qq --print-uris build-dep emc2 | awk '{print $1}' | sed "s/'//g" >> package_list
 apt-get -y -qq --print-uris install build-essential | awk '{print $1}' | sed "s/'//g" >> package_list

now transfer the file "package_list" to the machine with the internet connection and issue the command:

 cd $DISK; wget -i package_list

This should download all of the packages needed to run (and compile) emc2. You can then install them on the offline computer simply with:

 sudo dpkg -i $DISK/*.deb

4.4. without an internet connection BUT you have a working RunInPlace? dir on another machine AND a usb drive

 you can copy the RIP directory to the thumb drive, move it to the machine w/o network and use it (cant build but can run)
 trick 1: copying the directory wont get you the symlinks (esp in ~/yourRIP/lib )
           so tar the whole thing up              tar cvvf myrip.tar ~/myripdir/
           cp the tar to the thumb drive          cp myrip.tar  /media/mythumb
           umount the drive after write is done   sudo umount /media/mythumb
           remove the drive and insert into net-less machine
           cp the tar to the net-less box
           untar it                               tar xvf myrip.tar
 trick 2: the permissions wont be right yet
          cd to the src dir                       cd ~/myrip/src
          run this cmd left over from other machine's build        sudo make setuid

 should be good to go
          cd .. ( or cd ~/myrip )
          . scripts/emc-environment
          emc
          should be running the copied rip now
 variation: substitute using a LAN if you can (got network but not Internet... still need to tar it up for symlink copying )

5. Preparing other versions of Linux to compile emc2

5.1. BDI4

Instructions for BDI 4.38 are on their own page: BDI-4 38 Compile EMC2. These instructions should work, with modifications, for other versions of bdi4.

5.2. BDI-Live, BDI-TNG, BDI2

No documentation has been written for these versions. Using these versions of BDI is not recommended for any new systems. Consider using Ubuntu instead.

However, emc2 should work with the realtime kernels in each of these older distributions. Many userspace components may be needed, specifically including GNU Make 3.80 or newer. The package names listed below may be helpful in determining the requirements.

5.3. RTAI from scratch

Follow the instructions at RtaiSteps to build a real-time kernel for your particular Linux distribution. After that, you'll have to figure out the names of the extra packages needed to install and run emc2. As an aid, these are the packages required by the emc2 ubuntu package:
Depends: libatk1.0-0 (>= 1.9.0), libc6 (>= 2.3.4-1), libcairo2 (>= 1.0.2-2), libfontconfig1 (>= 2.3.0), libgcc1 (>= 1:4.0.2), libgl1-mesa | libgl1, libglib2.0-0 (>= 2.10.0), libglu1-mesa | libglu1, libgtk2.0-0 (>= 2.8.0), libice6, libpango1.0-0 (>= 1.12.3), libreadline5 (>= 5.1), libsm6, libstdc++6 (>= 4.0.2-4), libx11-6, libxaw7, libxcursor1 (>> 1.1.2), libxext6, libxfixes3, libxi6, libxinerama1, libxmu6, libxrandr2, libxrender1, libxt6, tcl8.4 (>= 8.4.5), tk8.4 (>= 8.4.5), linux-image-2.6.15-magma, rtai-modules-2.6.15-magma, tcl8.4, tk8.4, libreadline5, python2.4-numarray, python2.4-imaging, python2.4-imaging-tk, python (>= 2.4), python (<< 2.5), emc2, python (<< 2.5), python (>= 2.4), bwidget (>= 1.7), bwidget (<< 1.8), python2.4-tk, python2.4-xml
Build-Depends: debhelper (>> 4.0.0), linux-image-2.6.15-magma, rtai-modules-2.6.15-magma, linux-headers-2.6.15-magma, gcc-4.0, g++, make, libc6-dev, tcl8.4-dev, tk8.4-dev, libgtk2.0-dev, pciutils-dev, libncurses-dev, gettext, libxaw7-dev, libreadline5-dev, lyx-qt, python, tetex-bin, latex2html, python2.4-dev, libglu1-mesa-dev, libgl1-mesa-dev, libgnomeprint2.2-dev, groff, bwidget, tetex-extra

5.4. Simulator on Ubuntu 9.04

See this mailing list post.

5.5. Compiling EMC2 in a `simulator' mode on Ubuntu or Kubuntu 8.04 or 9.04

Enable that restricted by copyright or legal issues component called `multiverse' to reach the `bwidget' package in standard repositories. Type in Terminal:

ubuntu@ubuntu-laptop:~$ sudo apt-get update

[sudo] password for ubuntu: type_your_password Ign cdrom://Ubuntu? 8.04 _Hardy Heron_ - Release i386 (20080423) hardy/main Translation-ru Ign cdrom://Ubuntu? 8.04 _Hardy Heron_ - Release i386 (20080423) hardy/restricted Translation-ru Получено:1 http://ru.archive.ubuntu.com hardy Release.gpg [189B] Получено:2 http://ru.archive.ubuntu.com hardy/main Translation-ru [33,6kB] Получено:3 http://ru.archive.ubuntu.com hardy/universe Translation-ru [59,3kB] Получено:4 http://ru.archive.ubuntu.com hardy/universe Translation-ru [59,3kB] Получено:5 http://ru.archive.ubuntu.com hardy/multiverse Translation-ru [955B] Получено:6 http://ru.archive.ubuntu.com hardy Release [65,9kB] Получено:7 http://ru.archive.ubuntu.com hardy/main Packages [1178kB] Получено:8 http://ru.archive.ubuntu.com hardy/main Sources [338kB] Получено:9 http://ru.archive.ubuntu.com hardy/restricted Sources [1488B] Получено:10 http://ru.archive.ubuntu.com hardy/universe Packages [4293kB] Получено:11 http://ru.archive.ubuntu.com hardy/universe Sources [1323kB] Получено:12 http://ru.archive.ubuntu.com hardy/multiverse Packages [179kB] Получено:13 http://ru.archive.ubuntu.com hardy/multiverse Sources [60,9kB] Получено 7534kB за 27min27s (4572B/c) Чтение списков пакетов... Готово

On 8.04, type (use `Tab' button for auto-completition of the package names):

ubuntu@ubuntu-laptop:~$ sudo apt-get install python2.5-dev python-imaging-tk tk8.4-dev bwidget libreadline-dev gettext libglib2.0-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev xorg-dev build-essential

(On 9.04, just use `python2.6-dev' package -- version `2.6' instead of `2.5'.)

Now, from withing the `src' subdirectory of the emc2 source package (for example, I have just unpacked the `emc2_2.3.1.tar.gz' into `Home' directory and renamed it as `emc2-2.3.1--1'), in Terminal, type `./configure --enable-run-in-place --enable-simulator && make':

ubuntu@ubuntu-laptop:~/emc2-2.3.1--1/src$./configure --enable-run-in-place --enable-simulator && make

(You can type `./configure --help' to view all the options.)

Then `cd ..' to move into upper diectory and `scripts/emc' to run the program.

If for example you have installed a proprietary ATI driver and AXIS interface to the program runs but graphical window is `kind of in a shadow' until you drag the cursor withing this window, append the `/etc/X11/xorg.conf' file with following lines to disable effects as compiz and others:

Section "Extensions" Option "Composite" "disable" EndSection?

You can do it with a command like `sudo gedit /etc/X11/xorg.conf' or `sudo nano /etc/X11/xorg.conf', the latter one can be used in terminal. Now restart the Gnome Desktop Manager in Ubuntu with `sudo /etc/init.d/gdm restart' or KDE Desktop Manager in Kubuntu with `sudo /etc/init.d/kdm restart' for changes to be in effect. If all you have now is only a terminal, not GUI, use `nano' text editor to edit this `xorg.conf' file.

If everything seems to be in order and that graphical window in AXIS interface to EMC2 program works just fine, this particular words about compiling EMC2 in a simulator mode were probably useful to you. Remember, that `build-essential' package can be installed from the installation CD and it makes it possible to compile programs. `Xorg-dev' package installs fonts and other stuff; `tk8.4-dev' also installs `tcl8.4-dev'. This choice of pakages can be wrong or right, but it seems everything altogether works, and you can view or visualize G-Code with EMC2 on a laptop while working in a non-realtime mode in your favorite version of the Linux Ubuntu.

5.6. Simulator on other versions of Ubuntu

emc 2.2.0 builds in simulator mode on 32-bit and 64-bit Ubuntu 6.06, 6.10, 7.04, and 7.10 systems.

Download emc 2.2.0 or later from any source described above.

Enable the Universe and Multiverse repositories. Install the packages required to build and run emc2 (run "debian/configure sim", then refer to the file debian/control for the required packages).

Configure and build:

 $ cd emc2.2/src
 $ ./autogen.sh   ;# (not required on v2_3_branch and earlier)
 $ ./configure --enable-simulator --enable-run-in-place
 $ make

If all looks well, test drive it:

 $ ../scripts/emc ../configs/sim/axis.ini

.deb package support has been added, though this does not include extras like menu items. Follow the usual "debian/configure sim; dpkg-buildpackage" procedure to build a debian package.

5.7. Realtime on 64-bit systems

Since emc2.3, emc2 now works on at least some x86-64 CPUs in 64-bit mode. These instructions were followed on an Ubuntu "Dapper" system. AMD X2 3800+ CPU, 2GB RAM, nvidia nforce-mcp51 chipset, X server using "vesa" driver.

6. Nvidia Card configuration issues

The closed source nvidia drivers are known to be incompatible with realtime kernels. This has been reported to nvidia but they seem uninterested in fixing it, and because their drivers are not open source, nobody else can fix it either.

To get your nvidia graphics card working, edit the xorg.conf file in the /etc/X11 directory. At about line 66, in the section "Device", find a line that looks like: Driver "nvidia" , replace nvidia with "nv" or "vesa" (try "nv" first). If you have previously tried to use the nvidia driver, you must remove nvidia-related packages by issuing the following command from a terminal:

 sudo apt-get --purge remove nvidia-glx nvidia-settings nvidia-kernel-common 

There is at least one report that even when using the open source 'nv' driver, the latency test will show failures.

7. Uninstalling EMC2 from source

If you wish to remove a package, a simple `sudo apt-get remove emc2` will suffice. However, if you've installed emc2 from source with `make install` then there will be files left around everywhere. You can not then install emc2 from a package, as the files will conflict. This is an attempt to document all of them. The following script assumes that you still have the compiled emc2 source tree. This is why we recommend to always use --enable-run-in-place when you build your own emc2.

export SRCPATH=<path to your emc build>

 #remove the python modules
 cd /usr/lib/python2.4/site-packages/
 ls $SRCPATH/lib/python | xargs sudo rm -r

 sudo rm -r /usr/local/etc/emc2/ /usr/realtime*/modules/emc2/ /usr/local/share/emc/ /usr/local/share/axis/
 sudo rm /etc/init.d/realtime

 cd /usr/local/bin/
 ls $SRCPATH/bin/ | xargs sudo rm
 sudo rm emc emcmkdesktop halrun 

 cd /usr/local/lib
 ls $SRCPATH/lib/ | xargs sudo rm

um, i guess that's everything. You may need to apt-get remove --purge emc2 if you installed it "over" the existing install, otherwise you will get the wrong /etc/init.d/realtime script (or no script!)

One way to avoid this predicament is instead of "make install", to use the "checkinstall" program, which monitors the install process and creates a package for you that can easily be uninstalled.


EmcKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited June 29, 2010 9:36 am by JeffEpler (diff)Published under a Creative Commons License