How to install codeblocks in RedHat without root authority

How to install codeblocks in your user directory without root and system file authority

install wxWidgets

  • enter wxwidgets website to download the version of Source Code named “Source for Linux,OS X,etc”
  • enter the download directory,extract the download file:
tar -jxvf wxWidgets-3.1.0.tar.bz2
  • in your user directory,create a wxWidgets bin directory,then enter the wxWidgets decompressed directory,config the working directory:
cd ~
mkdir wxWidget
cd ~/Download/wxWidgets-3.1.0
./configure --prefix=/home/$USER/wxWidget
  • then make the install,in the decompressed directory,input:
make
make install
  • install successful screenshot
    这里写图片描述

  • set LD_LIBRAY_PATH,because we don’t have the permission to modify the bash_profile,so just input:

setenv PATH ${PATH}:/home/$USER/wxWidget/bin

这里写图片描述

aclocal too low,install aclocal 1.13

  • create the automake and autoconf directory:
cd ~
mkdir autoconf
mkdir automake
  • setup the autoconf compnont
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xvzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure prefix=/home/$USER/autoconf
make
make install

check the version of autoconf,if the version is 2.69,it is OK:

/home/$USER/autoconf -V

-setup the automake compnont

wget http://ftp.gnu.org/gnu/automake/automake-1.13.tar.gz
tar xvzf automake-1.13.tar.gz
cd automake-1.13
setenv PATH /home/$USER/automake/bin:${PATH}
./configure prefix=/home/$USER/automake
make
make install

update autoconf/automake/aclocal

setenv PATH /home/$USER/automake/share/automake-1.13:${PATH}
setenv PATH /home/$USER/automake/share/aclocal-1.13:${PATH}
aclocal
autoreconf
libtoolize

config wxWidget,wxGTK

setenv PATH /home/$USER/wxWidget/bin:${PATH}
setenv PATH /home/$USER/wxWidget/share/aclocal:${PATH}
cp /home/$USER/wxWidget/share/aclocal/wxwin.m4 /home/$USER/automake/share/aclocal

visit the wxWidgets web site,download the wxGTK-2.8.7.tar.gz,then:

tar -zxvf wxGTK-2.8.7.tar.gz
cd wxGTK-2.8.7
mkdir ~/wxGTK
mkdir build_gtk
cd build_gtk
../configure --prefix=/home/$USER/wxWidget --enable-xrc --enable-monolithic --enable-unicode
make
make install
  • then check if the configuration is ok.
wx-config --prefix #should give you /home/$USER/wxWidget
wx-config --libs #should have at least: -L/home/$USER/wxWidget/lib -lwx_gtk2-2.8
which wx-config #should return /home/$USER/wxWidget/bin/wx-config

install codeblocks

  • enter codeblocks website to download the version of Source Code named “codeblocks_16.01.tar.gz”
  • extract the download file:
tar -zxvf codeblocks_16.01.tar.gz
  • in your user directory,create a codeblocks bin directory,then enter the codeblocks decompressed directory,config the working directory:
cd ~
mkdir codeblocks
cd ~/Download/codeblocks-16.01.release
##add pkg.m4 path
setenv PATH /home/$USER/automake/share/aclocal:${PATH}
./bootstrap
./configure --prefix=/home/$USER/codeblocks --with-wx-config=/home/$USER/wxWidget/bin/wx-config
  • the result like this:
    这里写图片描述

  • compile and setup,input:

make
make install

just like this:
这里写图片描述

  • start the codeblocks,failed:
./codeblocks &
##./codeblocks: error while loading shared libraries: libwx_gtk2u-2.8.so.0: cannot open shared object file: No such file or directory

The problem is that the program cannot find the WX widgets libraries at run time:

这里写图片描述

##the directory depends on your own,maybe not the same of mine.
setenv LD_LIBRARY_PATH /home/$USER/wxWidget/lib
  • then start codeblocks again,got it:
./codeblocks &

这里写图片描述

tips

Because I don’t have the right to modify the /etc/profile,so here I just use ‘setenv’ command.it is not very well because if you sign out,it doesn’t work.So it is a better way to set the configuration in the ‘.bashrc’ file in your user directory.

Installing Code::Blocks from source on Linux
libccls compile problem
安装 Autoconf 2.69版
LD_LIBRARY_PATH: Undefined variable error

Delete a snapshot from cassandra

aclocal-1.14: command not found

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值