CentOS 6.5 安裝CodeBlocks

CentOS 6.5 安裝CodeBlocksphp

  經歷了無數痛苦的折磨,Linux上的庫依賴真是能把人逼瘋,終於在Google上找到了辦法,勉強將CodeBlocks安裝成功。ios

1.爲了不最新版本的CodeBlocks在6.5上的依賴問題,因此在CodeBlocks官網上下載了舊版本的軟件,此處並無使用源碼安裝,而是使用編譯好的二進制版本:bootstrap

  codeblocks-13.12-1.el5.x86_64.tar.bz2windows

2.更新源centos

  下載源文件:http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmdom

  rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
  yum install --enablerepo=rpmforge-extras
3.CodeBlocks依賴wxGTK,安裝wxGTK
  yum install wxGTK-devel
4.解壓codebocks包,而後安裝全部組件
  rpm -ivh *.rpm
5.最後安裝xterm,不然編譯後,運行時沒法顯示控制檯窗口而報錯
  yum install xterm
6.進行編輯器配色
  這裏提供了多種配色方案,須要將<colour_sets>和</colour_sets>之間的配色信息 入Codeblocks的default.conf文件中相應標籤下,default.conf文件存儲在「home/username/.codeblocks」目錄中。
  Settings --> Editor... --> Syntax hightlighting -->
    Solarized Dark
    Keyword -> Green
    Operator -> Yellow
    Preprocessor -> Purple
7.更改光標顏色
  Settings  --> Editor... --> Margins and caret -->Caret 
    Colour -> Red
    Widht -> 2
8.添加VIM插件
 
 
附錄:
1.安裝問題
  在百度和Bing上搜索了不少解決方案,每個靠譜的,最後還得求助於Google解決問題,下面是Google上搜到的解決方法, 原文連接
 
  

#Install some necessary libraries
yum groupinstall "Development Tools" ssh

 
  

#install rpmforge, there are other ways, here I use wget to download rpm package and install
#install wget
yum install wget
mkdir ~/temp
cd ~/temp
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm編輯器

 
  

rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install --enablerepo=rpmforge-extrassvn

 
  

#Install wxGTK
yum install wxGTK-develui

 
  

#Install codeblocks from source
#ref:http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_RPM_based_distributions
cd ~
mkdir codeblocks
cd codeblocks
svn checkout svn://svn.berlios.de/codeblocks/trunk
cd trunk
./bootstrap
./configure
make
sudo make install

 
  

#Now Code::Blocks has installed, configure remote access
#enable X11 forwarding: ref:http://www.techotopia.com/index.php/Displaying_CentOS_Applications_Remotely_(X11_Forwarding)
sudo vi /etc/ssh/ssh_config
#Edit the file and make sure -> X11Forward yes
sudo yum xorg-x11-xauth.x86_64
sudo yum install xorg-x11-fonts

 
  

#Now on a Windows client, using Putty and Xming access the server
#On windows desktop, download and install Xming Server and Xming fonts
#in Putty, enable X11 Forwarding, set display to "Localhost:0"

 
  

#Type the following:
echo $DISPLAY
#It should return localhost:10.0

 
  

#Run Code::Blockscodeblocks &

相關文章
相關標籤/搜索