본문 바로가기

TORCS

How to install TORCS on ubuntu 16.04LTS

반응형

** 우분투에서 TORCS 설치 **


Background: ubuntu16.04LTS + torcs-1.3.6


step1) install required open source libraries


Hardware accelerated OpenGL (freeglut, freeglut-dev)

    1) make sure c complier such as gcc has installed in Ubuntu

             $sudo apt-get install gcc # already installed in Ubuntu

 

    2) make sure you have the following packages installed

             $xrandr --version # header files for x11, already installed in Ubuntu

            $sudo apt-get install libgl1-mesa-dev # opengl, already installed in Ubuntu

            $sudo apt-get install libx11-dev # opengl, already installed in Ubuntu

$sudo apt-get install libxrandr-dev # opengl

 

    3) install Xinput

             $ sudo apt-get install libxi-dev

 

    4) run ‘$sudo apt-get install freeglut’ # if this doesn’t work at all, do 4-e1) and 4-e2)

 

    4-e1) download freeglut-3.0.0 from the website and unpack

 

    4-e2) run ‘$cmake' in the freeglut directory to generate the makefile

 

    5) run ‘$sudo apt-get install freeglut3-dev’

 

 

PLIB-1.8.5

    1) download the source package from the website and unpack

 

    2) install libxmu-dev, libxmu6

             $sudo apt-get libxmu-dev

             $sudo apt-get libxmu6

 

    3) install PLIB

$cd plib-1.8.5

          $export CFLAGS="-fPIC"

          $export CPPFLAGS="-fPIC"

          $export CXXFLAGS="-fPIC"

          $./configure

          $ sudo make install

 

 

OpenAL

    1) download the source package from the website  and unpack

 

  2) install

$cd openal-soft-1.17.2/build

          $cmake ..

          $make

          $sudo make install

          $sudo apt-get install libalut-dev

 

 

ZLIB

    1) download the source package from the website and unpack

 

    2) install

$cd zlib-1.2.11

          $./configure

          $make test

          $sudo make install

 

 

LIBPNG

    1) download the source package from the website and unpack

 

2) install

$cd libpng-1.6.29

          $./configure or ./configure --with-GL=/usr/local

          $make check

          $sudo make install

 

    3) if this doesn’t work at all, try

 

             $sudo apt-get install libpng12-dev

 

 

LIBOGG

1) download the source package from the website and unpack

 

    2) install

$cd libogg-1.3.2

          $./configure

          $make

          $sudo make install

 

 

LIBVORIBS

1) download the source package from the website and unpack

 

2) install

$cd libvorbis-1.3.5

          $./configure

          $make

          $sudo make install





step2) install TORCS


   1) download the source package from the website and unpack

 

   2) install

          $cd torcs-1.3.7

          $./configure

          $make

          $sudo make install

          $sudo make datainstall

 

   3) add liabray path to bashrc file

$gedit ~/.bashrc

 

          export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

export TORCS_BASE=/home/dooseop/torcs-1.3.7

export MAKE_DEFAULT=$TORCS_BASE/Make-default.mk

 

    4) set

$cd /usr/local/share/games

          $chown -R dooseop:dooseop torcs

          $cd /usr/local/lib

          $chown -R dooseop:dooseop torcs