色碼擷取器 - Gpick安裝教學(失敗版)

官網:https://code.google.com/p/gpick/
可使用 yum 安裝,來源是EPEL,但是版本當然不是最新的。
以下是安裝最新版本的步驟。

下載gpick套件,但是格式為deb檔,因此要轉換成CentOS可以安裝的格式,轉換工具為alien

# mkdir -p /data/src
# wget https://gpick.googlecode.com/files/gpick_0.2.5-1_i386.deb
# wget http://ftp.de.debian.org/debian/pool/main/a/alien/alien_8.90.tar.gz
# tar zxf alien_8.90.tar.gz
# cd alien
# perl Makefile.PL
  Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5
  /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at Makefile.PL line 2.
  BEGIN failed--compilation aborted at Makefile.PL line 2. //缺少 ExtUtils::MakeMaker 模組,透過CPAN安裝即可。
# perl Makefile.PL
# make && make install
# yum install -y rpm-build
# cd ..

# alien -r gpick_0.2.5-1_i386.deb
  Warning: Skipping conversion of scripts in package gpick: postinst postrm
  Warning: Use the --scripts parameter to include the scripts.
  gpick-0.2.5-2.i386.rpm generated

# rpm -ivh gpick-0.2.5-2.i386.rpm
  error: Failed dependencies:
    liblua5.2.so.0 is needed by gpick-0.2.5-2.i386
    libstdc++.so.6(GLIBCXX_3.4.15) is needed by gpick-0.2.5-2.i386
註:deb轉換rpm參考文獻

安裝 liblua5.2.so.0

# wget http://mirrors.kernel.org/ubuntu/pool/main/l/lua5.2/liblua5.2-0_5.2.2-1_i386.deb
# alien -r liblua5.2-0_5.2.2-1_i386.deb
# rpm -ivh liblua5.2-0-5.2.2-2.i386.rpm

查詢 GLIBCXX 版本

# find / -name libstdc++.so.6
  /usr/lib/libstdc++.so.6
# strings /usr/lib/libstdc++.so.6 | grep GLIBCXX
  ...略
  GLIBCXX_3.4.11
  GLIBCXX_3.4.12
  GLIBCXX_3.4.13 <==很明顯沒有我們需要的版本GLIBCXX_3.4.15
  GLIBCXX_FORCE_NEW
  GLIBCXX_DEBUG_MESSAGE_LENGTH

# rpm -qf /usr/lib/libstdc++.so.6 //找尋libstdc++.so.6是哪一個套件提供的(方法2:yum whatprovides libstdc++.so.6)
  libstdc++-4.4.7-4.el6.i686

# rpm -q gcc
  gcc-4.4.7-4.el6.i686 //目前gcc版本

# rpm -q centos-release
  centos-release-6-5.el6.centos.11.1.i686 //目前作業系統版本


安裝 libstdc++.so.6(GLIBCXX_3.4.15)

# wget ftp://ftp.univie.ac.at/systems/linux/fedora/updates/20/x86_64/libstdc++-4.8.2-7.fc20.i686.rpm
# rpm -ivh libstdc++-4.8.2-7.fc20.i686.rpm
# rpm2cpio libstdc++-4.8.2-7.fc20.i686.rpm |cpio -idmv
# pwd
  /root/GLIBC/usr/lib
# ll
  lrwxrwxrwx. 1 root root 19 Mar 24 01:20 libstdc++.so.6 -> libstdc++.so.6.0.19
  -rwxr-xr-x. 1 root root 938796 Dec 12 11:26 libstdc++.so.6.0.19
# rm /usr/lib/libstdc++.so.6
# ln -s /usr/lib/libstdc++.so.6.0.19 /usr/lib/libstdc++.so.6
# strings /usr/lib/libstdc++.so.6 | grep GLIBCXX
  ...略
  GLIBCXX_3.4.14
  GLIBCXX_3.4.15
  GLIBCXX_3.4.16
  GLIBCXX_3.4.17
  GLIBCXX_3.4.18
  GLIBCXX_3.4.19
# rpm -ivh gpick-0.2.5-2.i386.rpm
  error: Failed dependencies: //還是失敗
    libstdc++.so.6(GLIBCXX_3.4.15) is needed by gpick-0.2.5-2.i386

升級GLIBC

# rpm -qi glibc | grep "Version"
  Version : 2.12   Vendor: CentOS
# wget ftp://195.220.108.108/linux/fedora/linux/development/rawhide/i386/os/Packages/g/glibc-common-2.19.90-7.fc21.i686.rpm
# wget ftp://195.220.108.108/linux/fedora/linux/development/rawhide/i386/os/Packages/g/glibc-headers-2.19.90-7.fc21.i686.rpm
# wget ftp://195.220.108.108/linux/fedora/linux/development/rawhide/i386/os/Packages/g/glibc-devel-2.19.90-7.fc21.i686.rpm
# wget ftp://195.220.108.108/linux/fedora/linux/development/rawhide/i386/os/Packages/g/glibc-2.19.90-7.fc21.
i686.rpm
# rpm -Uvh --aid --nodeps glibc-devel-2.19.90-7.fc21.i686.rpm
# rpm -Uvh --aid --nodeps glibc-headers-2.19.90-7.fc21.i686.rpm
# rpm -Uvh --aid --nodeps glibc-2.19.90-7.fc21.i686.rpm
# rpm -Uvh --aid --nodeps glibc-common-2.19.90-7.fc21.i686.rpm
# rpm -qi glibc | grep "Version"
  Version : 2.19.90   Vendor: Fedora Project
# rpm -ivh gpick-0.2.5-2.i386.rpm
  error: Failed dependencies: //還是失敗
    libstdc++.so.6(GLIBCXX_3.4.15) is needed by gpick-0.2.5-2.i386

我想是我目前的功力還不夠解決"libstdc++.so.6(GLIBCXX_3.4.15) is needed by gpick-0.2.5-2.i386"這個問題,以後有時間再來奮戰吧!


沒有留言:

張貼留言