Linux installation 32-bit runtime "several ways to configure Yum sources in Linux"

Source: Internet
Author: User
Tags gpg

  

Preface: This post is only applicable to Redhat, CentOS 64-bit system

Many times we need to run or test the program with Linux, but we find that 64-bit Linux systems will error when detecting dynamic link library files for 32-bit programs (that is, ldd an so file):

  Not a dynamic executable "or English tip: nota dynamic executablefile"

This is because the system does not have a 32-bit compatible library, we have two major ways to solve this problem → network/ no network

First, the current use of the Linux system is connected to the network situation, can be installed online

Yum Install online:sudo yum install xulrunner.i686
Or:sudo yum install ia32-libs.i686

Ubuntu system:sudo apt-get install ia32-libs

But here is a note, Redhat system by default is required to register to use Yum's online installation features, if not registered system will prompt:

  This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.

  If you do not want to spend money to register, please refer to Plan B: " Configure the Yum source using CentOS network resources "

Backup original repo file:mv/etc/yum.repos.d/rhel-debuginfo.repo/etc/yum.repos.d/rhel-debuginfo.repo.repo.bak

Edit Repo file: vi/etc/yum.repos.d/rhel-debuginfo.repo

The contents are:

[Base]

name=centos-$releasever-base

baseurl=http://mirrors.163.com/centos/6.0/os/$basearch/

Gpgcheck=1

Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6

#released Updates

[Updates]

name=centos-$releasever-updates

baseurl=http://mirrors.163.com/centos/6.0/updates/$basearch/

Gpgcheck=1

Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6

#packages used/produced in the build and not released

#[addons] #name =centos-$releasever-addons

#baseurl =http://mirrors.163.com/centos/$releasever/addons/$basearch/

#gpgcheck =1

#gpgkey =http://mirrors.163.com/centos/rpm-gpg-key-centos-6

#additional packages that could be useful

[Extras]

name=centos-$releasever-extras

baseurl=http://mirrors.163.com/centos/6.0/extras/$basearch/

Gpgcheck=1

Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6

#additional packages that extend functionality of existing packages

[Centosplus]

name=centos-$releasever-plus

baseurl=http://mirrors.163.com/centos/6.0/centosplus/$basearch/

Gpgcheck=1

Enabled=0

  Use after editing: Yum clean all cleanup Yum package

Install the 32-bit runtime using the Yum install vim or yum install xulrunner.i686 command

  

Second, the Linux system used is a closed network, unable to connect the external network

In this case we need to have the installation CD, which is the installation CD used in the current Linux system, can be divided into two cases

1): Mount with ISO image file

1. Create ISO storage directory and mount directory mkdir/mnt/iso mkdir/mnt/cdrom

2. Copy the ISO image file to the/mnt/iso folder

3. Mount the ISO file under/mnt/iso/to the/mnt/cdrom directory mount-o loop/mnt/iso/xxxxx.iso/mnt/cdrom < note: The operation will prompt the device to be busy when it is mounted,

Umount unpack the Mount > see if the mount is successful: Df-h < is used to view all mounts in the system, mount can also be >

4. cd/etc/yum.repos.d/ ==> Create your own. Repo file touch Myself.repo ==> VI Myself.repo

 [Base]

Name=redhat

Baseurl=file:///mnt/cdrom #注: Here BaseURL is the directory you mount, here is/mnt/cdrom

Enabled=1

Gpgckeck=0

Gpgkey=file:///mnt/cdrom/rpm-gpg-key-redhat-release #注: This parameter can be seen cd/mnt/cdrom/, this parameter is for reference only

5. Test:

 Yum Clean all ==> yum install vim* use yum install if invalid xulrunner.i686

  2:) Configure the Yum source with mounted image files "The disc is already mounted in the media file, showing the ISO image file that has been unzipped"

1. Mounting the disc Mount/dev/cdrom/media usually prompts:

  Mount:block Device/dev/sr0 is write-protected, mounting read-only

This means that the current disc is mounted in read-only mode and can be ignored, and you can add parameters to mount it:

  Mount-ro-loop/dev/cdrom/media #以只读方式挂载, you won't get an error.

2. Set up the Yum configuration file Vi/etc/yum.repos.d/local.repo content as follows:

  [Base]

name=linux6

Baseurl=file:///media

Gpgcheck=0

Enable=1

Gpgkey=file:///mnt/cdrom/rpm-gpg-key-redhat-release

3. Modify the Yum Source address vi/usr/lib/python2.6/site-packages/yum/yumrepo.py

In the last line mode (that is, the state of the ESC is pressed in the input state), enter/remote to find the remote word

Locate remote = URL + '/' + relative modified to:remote = '/yum ' + relative

4. Test: Yum Clean all install: yum install vim* or use yum install xulrunner.i686

If the system is installing a large stack of i686 packages, it will represent the completion of the

Appendix: Yum Description [Yum common commands]

  Yum (full name Yellow dog Updater, Modified) is a Shell front end Package Manager in Fedora and Redhat and CentOS. Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them automatically handles dependency relationships and installs all dependent packages at once, without the hassle of downloading and installing them over and over again.

Install the software (take foo-x.x.x.rpm as an example): Yum install foo-x.x.x.rpm  Remove software: Yum remove foo-x.x.x.rpm or yum erase foo-x.x.x.rpm upgrade software: Yum upgrade foo or yum update foo query information: Yum info foo

Search software (for example, include the Foo field): Yum search foo

Show package dependencies: Yum deplist foo

-e Silent execution- t ignore error-r[minutes] Set wait time-y auto Answer Yes--skip-broken ignore dependency problem--nogpgcheck ignore GPG validation

Check-update Check for updatable packages Clearn Clear all clean packages purge temporary package files (/var/cache/yum files) Clearn headers Clear rpm header file Clean Oldhea DERs clear Old rpm header file deplist List package dependent list installable and updatable RPM Package list installed installed package list extras installed and not in resource pool package info   Installable and updatable RPM package information info installed installed package information (-QA parameters similar) install[rpm Package] installation package Localinstall install local RPM Package UPDATE[RPM Package] Update package   Upgrade upgrade System search[keywords] Search package provides[keywords] search for a specific package file name REINSTALL[RPM Package] Reinstall Package Repolist Show Repository configuration RESOLVEDEP specify dependencies REMOVE[RPM Package] Unload package

Linux installation 32-bit runtime "several ways to configure Yum sources in Linux"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.