Ubuntu Precise 12.04 x86 (32-bit) 安装 LinuxCNC
7.2. Installing on Ubuntu Precise
Install Ubuntu Precise 12.04 x86 (32-bit). Any flavor should work (regular Ubuntu, Xubuntu, Lubuntu, etc). 64-bit (AMD64) is currently not supported. You can download the installer here: http://releases.ubuntu.com/precise/
Run the following to bring the machine up to date with the latest packages in Ubuntu Precise.
sudo apt-get update
sudo apt-get dist-upgrade
Add the LinuxCNC Archive Signing Key to your apt keyring by running
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 3cb9fd148f374fef
Add a new apt source
sudo add-apt-repository "deb http://linuxcnc.org/ precise base 2.7-rtai"
Fetch the package list from linuxcnc.org.
sudo apt-get update
Install the RTAI kernel and modules by running
sudo apt-get install linux-image-3.4-9-rtai-686-pae rtai-modules-3.4-9-rtai-686-pae
If you want to be able to build LinuxCNC from source using the git repo, also run
sudo apt-get install linux-headers-3.4-9-rtai-686-pae
Reboot, and make sure you boot into the rtai kernel. When you log in, verify that the kernel name is 3.4-9-rtai-686-pae.
uname -r
Run
sudo apt-get install linuxcnc
更换 ubuntu 内核
1、修改 /etc/default/grub 文件
打开文件
sudo gedit /etc/default/grub
修改文件
GRUB_DEFAULT=3 #更改数字设置默认启动项
更新
sudo update-grub
sudo reboot
重新启动,进入了Memory test(如下蓝屏):
错误:
Ubuntu12.04初次安装Qt之后可能出现Error while building/deploying project *** (kit: Desktop Qt 5.5.0 GCC 32bit) When executing step "Make"错误。
解决方案:
sudo apt-get install build-essential
然后按Esc,再按住shift回到下面这个界面:
选择
linux-image-3.4-9-rtai-686-pae
下载linuxcnc-dev
git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
查看 linucnc 版本:
git branch -a
切换到2.7 版:
git checkout -b remotes/origin/2.7
查看版本号:
git branch -v
编译:
cd /home/zz/workspace/linuxcnc-dev/src
zz@ubuntu:~/workspace/linuxcnc-dev/src$ ./autogen.sh
./autogen.sh: 6: ./autogen.sh: autoconf: not found
错误:
./autogen.sh: 6: ./autogen.sh: autoconf: not found :
解决方案:
sudo apt-get install autoconf automake libtool
编译:
cd /home/zz/workspace/linuxcnc-dev/src
zz@ubuntu:~/workspace/linuxcnc-dev/src$ ./autogen.sh
./configure --enable-simulator --with-realtime=uspace
错误:checking for libudev... configure: error: libudev-dev not found
解决方案: sudo apt-get install libudev-dev
sudo apt-get install libmodbus-dev
sudo apt-get install libgnomeprintui2.2-dev tcl8.5-dev tk8.5-dev libreadline-gplv2-dev asciidoc dblatex dvipng graphviz groff imagemagick inkscape python-lxml source-highlight texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-lang-cyrillic texlive-lang-french texlive-lang-german texlive-lang-polish texlive-lang-spanish texlive-latex-recommended w3c-linkchecker xsltproc libxmu-dev libglu1-mesa-dev libgl1-mesa-dev libboost-python-dev libmodbus-dev libusb-1.0-0-dev yapps2
/****
不安装LINUXCNC 从源码编
安装依赖库 Linux2.7.14
***/
sudo apt-get install blt freeglut3 hostmot2-firmware-3x20-1 hostmot2-firmware-4i65 hostmot2-firmware-4i68 hostmot2-firmware-5i20 hostmot2-firmware-5i22-1 hostmot2-firmware-5i22-1.5 hostmot2-firmware-5i23 hostmot2-firmware-7i43-2 hostmot2-firmware-7i43-4 hostmot2-firmware-all libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libgnome2-0 libgnome2-bin libgnomeui-0 libgnomeui-common libgtkglext1 libgtksourceview2.0-0 libgtksourceview2.0-common libidl-common libidl0 liborbit2 libvte-common libvte9 mesa-utils python-configobj python-glade2 python-gnome2 python-gtkglext1 python-gtksourceview2 python-imaging-tk python-opengl python-pyorbit python-support python-tk python-vte python-xlib tclreadline
错误:checking for intltool-extract... none
configure: error: intltool-extract not found
解决方案:
sudo apt-get install intltool
make
make setuid
IGH etherlabmaster 编译
wget https://github.com/ART-robot/ethercat_install/raw/master/etherlabmaster-code.tar.gz
root@ubuntu:/home/zz/workspace# tar -xvf etherlabmaster-code.tar.gz
root@ubuntu:/home/zz/workspace# cd etherlabmaster-code
root@ubuntu:/home/zz/workspace# ./bootstrap
root@ubuntu:/home/zz/workspace# ./autogen.sh
root@ubuntu:/home/zz/workspace# ./configure --with-linux-dir=/usr/src/linux-headers-3.4-9-rtai-686-pae --with-module-dir=/lib/modules/3.4-9-rtai-686-pae --enable-generic --with-rtai-dir=/usr/realtime-3.4-9-rtai-686-pae --enable-cycles --enable-hrtimer --enable-8139too=no
root@ubuntu:/home/zz/workspace# make