How to export files from rpm file on ubuntu system

  Author: Jiang Jiang <jznsmail at tom.com> 

   Recently, my colleague is developing JSR82 library for KVM. The compile of cldc library must use gcc 3.2 version. But the lastest version of ubuntu don't include gcc v3.2. So i only export it from old version of readhat. The below section trace steps.
1. download gcc-3.2-2-i386.rpm from rmp.pbone.net. It's about 37MB large.
2. must install alien tool for abstract binary files from rpm file and rebuild deb file. You can type 'sudo apt-get install alien' on the ubuntu system or debian system.
3. use 'alien -d xxx.rpm' command to create newly deb file as following:
    sudo alien -d gcc-3.2-2-i386.rpm ( you must root privilege)
the gcc_3.2-2_i386.deb file is created in the same directory, now.
4. use dpkg-deb command to abstract summary info, binary files and library files. you can as following:
    mkdir gcc   (the abstracted files will store in gcc directory)
    dpkg-deb -e gcc_3.2-2_i386.deb gcc/DEBIAN   (abstract control files)
    dpkg-deb -x gcc_3.2-2_i386.deb gcc/   (abstract binary files and library files)
The last, i only use gcc-3.2 compiler and don't wanna rebuild deb package. I f you want, you can simple type 'dpkg-deb -b gcc gcc_3.2-2_i386_moidfy.deb' command.

Bibliography:
Debian 維護工具之 Dpkg

發佈了71 篇原創文章 · 獲贊 6 · 訪問量 25萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章