tar.gz转换成rpm

Building RPM packages from tar.gz archives
With working rpmbuild -ta
If you are runnig a system with RPM support, the preferred way to install Kwave on your system will be the creation of a nice RPM package. First you should get the current source of Kwave, either as a tar.gz archive from the Kwave download page or check out an up-to-date copy via SVN (like described in the chapter about SVN) and read the next chapter.

If you have downloaded a tar.gz archives of Kwave, create and install the RPMs just by doing the following steps (where [arch] stands for the platform you have built the package and might be something like i386, i586, sparc or whatever, XXX stands for the version number you have downloaded).

To build the Kwave package and install it do:

% rpmbuild -ta kwave-XXX.tar.gz
% rpm -i /usr/src/redhat/RPMS/[arch]/kwave-XXX.[arch].rpm


Note
Note for SuSE users: you have to specify the directory /usr/src/packages instead of /usr/src/redhat !

If you haven't seen any errors, then that's it and you can skip the rest of this chapter. If rpm was unable to build the packages and says something like "spec file not found", then go on and read the rest of this section.

With broken rpmbuild -ta support
If you can't get rpmbuild -ta working, here are the steps for making that manually (the hard way):

Go to your RPM "topdir". This normally is /usr/src/redhat for the redhat distribution or /usr/src/packages if you have the SuSE distribution.

% cd /usr/src/redhat


Put the tar.gz archive into the SOURCES subdirectory (you have to replace "somewhere" with the real directory where the files are, of course).

% cp /somewhere/kwave-XXX.tar.gz SOURCES


Extract the spec file from the archives and put it into the SPEC subdirectory.

% tar -xOzf SOURCES/kwave-XXX.tar.gz \*.spec > SPECS/kwave.spec


Let rpm do the compile job and generate the rpm of Kwave. If you only want to make a binary package, you can specify -bb instead of -ba, or just -bs to build only a source package.

% rpmbuild -ba SPECS/kwave.spec


If everything was ok, you can install the binary rpm of Kwave, it will be in the BUILD directory. If you already have a version of Kwave installed, please remove it first or use the parameter -U instead of -i for upgrading instead of installing.

% rpm -ivh BUILD/[arch]/kwave-XXX.[arch].rpm
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: JDK(Java Development Kit)是用于开发Java应用程序的软件包。JDK提供了Java编译器和其他工具,开发人员可以使用它们来编写、编译和运行Java程序。根据不同的操作系统,JDK提供了不同的安装方法,其中包括使用tar.gzrpm进行安装。 tar.gz是一种常见的压缩文件格式,它通常用于在Linux和Unix系统中进行软件的安装和部署。使用tar.gz文件进行JDK的安装可以通过以下步骤进行: 1. 下载JDK的tar.gz文件,通常从Oracle官方网站上获取。 2. 解压tar.gz文件,使用命令`tar -xvf filename.tar.gz`进行解压,将会生成一个包含JDK文件的目录。 3. 配置环境变量,将解压后的JDK目录添加到`PATH`变量中,以便系统可以找到JDK的执行文件。 RPM(Red Hat Package Manager)是一种用于在Linux系统上进行软件包管理的工具。通过RPM进行JDK的安装可以通过以下步骤进行: 1. 下载JDK的RPM包文件,通常从Oracle官方网站上获取。 2. 使用命令`rpm -ivh filename.rpm`进行安装,其中`-i`表示安装,`-v`表示显示详细信息,`-h`表示显示进度条。 3. 安装完成后,系统会自动将JDK的文件放置在适当的位置,并配置好环境变量,以便系统可以找到JDK的执行文件。 总结来说,JDK可以通过tar.gzrpm两种方式进行安装。使用tar.gz需要手动解压和配置环境变量,而使用rpm则是通过软件包管理工具进行自动化安装和配置。根据不同的操作系统和个人喜好,选择合适的安装方式即可。 ### 回答2: JDK是Java Development Kit(Java开发工具包)的缩写,是用于开发和编写Java程序的软件包。jdk.tar.gz和jdk.rpm都是用于安装JDK的不同格式。 jdk.tar.gz是一种压缩格式,使用targzip工具打包压缩的文件。它是跨平台的,可以在各种操作系统上使用。安装jdk.tar.gz需要先解压缩文件,然后根据对应的操作系统进行配置,设置环境变量等。这种方式比较灵活,适用于多种操作系统,但安装过程相对复杂。 而jdk.rpm是适用于使用Red Hat Package Manager(RPM)的Linux系统的安装包。RPM是一种包管理工具,用于在Linux系统上安装、升级、卸载软件。使用jdk.rpm安装JDK可以简化安装过程,只需使用rpm命令安装即可,系统会自动处理安装的依赖关系,并进行相关配置。这种方式适用于使用RPM的Linux发行版,如Red Hat、CentOS等。 总之,jdk.tar.gz和jdk.rpm都是安装JDK所使用的不同格式,前者适用于多种操作系统,需要手动解压缩和配置;而后者适用于使用RPM的Linux系统,可以通过rpm命令自动安装和配置。选择哪种格式安装取决于操作系统和个人需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值