In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The article comes from the official account: Ruijiang Cloud Computing
Please indicate the source of the reprint.
Use Alien to convert RPM to DEB
In this article, we will introduce you to alien, a tool for converting different Linux package formats to and from one another. The most common use is to convert .rpm to .deb (or vice versa).
I believe that many friends who use linux desktops (such as Fedora) for daily work have also encountered. If you need a particular type of package and you can only find packages in other formats, the tool will come in handy sooner or later-even if the author no longer maintains it and states on its website that alien will probably remain experimental forever.
For example, once I was looking for a .rpm installation package for music software or translation software, but I couldn't find it-the developer only provided a .deb package, and alien saved me. I installed alien, converted the package, and soon I could use the software I wanted without any problems.
Even so, we must clarify that this tool should not be used to convert important system files and libraries because they have different configurations in different distributions. Alien can be used as a last resort only if the recommended installation method is not suitable at all in the case mentioned earlier.
Finally, we must note that although we use CentOS and Fedora in this article, in addition to the first two distributions and their respective family systems, as far as we know, alien can also work in Debian, Slackware, or even Solaris.
Step 1: install Alien and its dependent packages
To install alien into CentOS/RHEL 7, you need to enable EPEL and Nux Dextop (yes, Dextop--, not Desktop) repositories in the following order:
1. # yum install epel-release
The latest version of the Nux Dextop repository-enabled package is currently 0.5 (released February 20, 2018), and you can check to see if there is an updated version in the link before installing.
Http://li.nux.ro/download/nux/dextop/el7/x86_64/
1. # rpm-- import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
2. # rpm-Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
And then do it.
1.#yum clean all
2.#yum repolist
3.#yum install alien
In Fedora, you only need to run the above command.
In Debian and its derivatives, you only need to:
1. # aptitude install alien
Step 2: convert .deb to .rpm package
For this test, we chose the date tool, which provides a series of date and time tools for processing large amounts of time data. We will download the .deb package to our CentOS 7 machine, convert it to .rpm and install:
Check CentOS Version
Check the CentOS version
1. # cat / etc/centos-release
2. # wget http://ftp.us.debian.org/debian/pool/main/d/dateutils/dateutils_0.3.1-1.1_amd64.deb
3. # alien-to-rpm-scripts dateutils_0.3.1-1.1_amd64.deb
Convert .deb to .rpm in Linux
Important: (notice how alien increases the minor version number of the target package. If you want to ignore this behavior, please add the-keep-version logo).
If we try to install the package right away, we will encounter some problems:
1. # rpm-Uvh dateutils-0.3.1-2.1.x86_64.rpm
Install the RPM package
To resolve this problem, we need to enable the epel-testing repository and then install the rpmbuild tool to edit the configuration of the package to rebuild the package:
1.#yum--enablerepo=epel-testing install rpmrebuild
Then run
1.#rpmrebuild-pedateutils-0.3.1-2.1.x86_64.rpm
It will open your default text editor. Please go to the% files section and delete the lines related to the directory mentioned in the error message, then save the file and exit:
Convert .deb to Alien version
However, after you exit the file, you will be prompted to continue refactoring. If you select "Y", the file will be refactored to the specified directory (different from the current working directory):
1.#rpmrebuild-pedateutils-0.3.1-2.1.x86_64.rpm
Build the RPM package
Now you can continue to install the package and verify as usual:
1.#rpm-Uvh / root/rpmbuild/RPMS/x86_64/dateutils-0.3.1-2.1.x86_64.rpm
2.#rpm-qa | grep dateutils
Install and build the RPM package
Finally, you can list the tools included in the date tool, or you can view their own man pages:
1. # ls-l / usr/bin | grep dateutils
Verify the installed RPM package
Summary
In this article, we have explained how to convert .deb to .rpm packages, which can be used as a last resort that such programs cannot be obtained from the repository or as distributable source code.
The article refers to Linux China.
[Rui Jiangyun] recharge big rebate, pre-recharge back 10,000 yuan, purchase for two years free of August. Pre-recharge, return coupon immediately, you can save up to 10000 yuan.
Link to participate in events: http://www.eflycloud.com/#/home?from=RJ0028&salesID=62DS7F2GA
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.