In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install the RPM package on Arch Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
1. Install rpmextract
Rpmextract is a tool for extracting RPM. It unzips the contents of the RPM package to the current directory.
Sudo pacman-S rpmextract-- noconfirmresolving dependencies...looking for conflicting packages... Packages (1) rpmextract-1.0-8 Total Download Size: 0.00 MiBTotal Installed Size: 0.00 MiB:: Proceed with installation? [Y/n]:: Retrieving packages... Rpmextract-1.0-8-any 0.0B 0.00B/s 00:00 [-] 0 rpmextract-1.0-8-any 2.5 KiB 0.00B/s 00:00 [# #] 100% (0 checking keys in keyring 1) checking keys in keyring [-] 0 (1) checking keys in keyring [# #] 100% (0) checking package integrity [-] 0 (1 / 1) checking package integrity [# #] 100% (0 loading package files 1) loading package files [-] 0% (1 hand 1) loading package files [# #] 100% (0Uniq1) checking for file conflicts [-] 0% (1Plac1) checking for file conflicts [# #] 100% (0amp1) checking available disk space [ --] 0% (1amp 1) checking available disk space [# #] 100% installing rpmextract: Processing package changes... (1amp 1) installing rpmextract [- -] 0% (1) installing rpmextract [# #] 100%: Running post-transaction hooks... (1) Arming ConditionNeedsUpdate...2, Use rpmextract to extract the RPM file
Since the directory structure packaged in the RPM file is based on the root directory, it is recommended to extract it directly under the root directory:
Cd / sudo rpmextract.sh ~ lujun9972/android-x86-7.1-r2.x86_64.rpm3, extract the script that is called when installing RPM
It is not enough to extract the files in the RPM package; the RPM file executes a script before / after installation (or uninstallation).
This script can be viewed by rpm-qp-- script file.rpm.
However, what if ArchLinux doesn't have a rpm command? We can run a CentOS on a virtual machine or directly use docker to simulate a CentOS environment.
Docker run-- rm-v ~ lujun9972/android-x86-7.1-r2.x86_64.rpm:/tmp/android.rpm centos rpm-qp-- scripts / tmp/android.rpmpostinstall scriptlet (using / bin/sh): / etc/os-releasemkdir-p / android-7.1-r2/dataif ["$ID" = "debian"-o "$ID_LIKE" = "debian"]; then grubcfg=/boot/grub/custom.cfgelif mountpoint-Q / boot/efi Then grubcfg=/boot/efi/EFI/$ID/custom.cfg & & efi=efielse grubcfg=/boot/grub2/custom.cfgfiecho-e "menuentry\" Android-x86 7.1-r2\ "{\ n\ tsearch-- set=root-- file / android-7.1-r2/kernel\ n\ tlinux$efi / android-7.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug\ n\ tinitrd$efi / android-7.1-r2/initrd.img\ n}" > $grubcfgecho-e "menuentry\" Android-x86 7 .1-R2 (DEBUG mode)\ "{\ n\ tsearch-- set=root-- file / android-7.1-r2/kernel\ n\ tlinux$efi / android-7.1-r2/kernel root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug DEBUG=2\ n\ tinitrd$efi / android-7.1-r2/initrd.img\ n}" > $grubcfg if ["$ID" = "debian"-o "$ID_LIKE" = "debian"] Then sed-I's / ^ grub _ HIDDEN_/#GRUB_HIDDEN_/' / etc/default/grub update-grubfipostuninstall scriptlet (using / bin/sh):. / etc/os-releaseif ["$ID" = "debian"-o "$ID_LIKE" = "debian"]; then grubcfg=/boot/grub/custom.cfgelif mountpoint-Q / boot/efi; then grubcfg=/boot/efi/EFI/$ID/custom.cfgelse grubcfg=/boot/grub2/custom.cfgfiif ["$1" = "1"]; then new_prefix= `dirname $(grep initrd $grubcfg | head-1 | awk'{print $2}') `if ["$new_prefix"! = "/ android-7.1-r2"] Then rmdir $new_prefix/data mv / android-7.1-r2/data $new_prefix rmdir / android-7.1-r2 fielse rmdir / android-7.1-r2/data / android-7.1-r2 rm-f $grubcfgfi4, call the installation script
With any luck, you can install RPM.
This is the end of the article on "how to install RPM package on Arch Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.