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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值