Check whether yum, rpm, and repo are related to CentOS installation R.

Source: Internet
Author: User

Check whether yum, rpm, and repo are related to CentOS installation R.

Install the software by double-hitting .exe (or. dmg) in the graphic interface, which may cause great discomfort on the Linux server. Previously, I used Google directly, and threw the installation command directly to bash no matter how many days, so I hope to install it smoothly ......

But today, when I want to reinstall the R language, since it was previously manually compiled and installed, now you need to use yum for installation, but there is always an error (yum installation processes some dependencies to make rstudio-server Run Smoothly ). I don't want to endure this kind of feeling, so I understood the relationship between yum, rpm, and repo:

 

This will be a series of articles related to Elasticsearch. Welcome to my personal blog: http://logos.name/

 

Software Package Management System

First, yum, rpm, and repo all belong to the software package management system. The problem with re-installing the R language that I encountered today is the lesson of blood and tears: less than had to compile and install the software on their own, or it would be a mess after a long time of management, most software can be uniformly installed and managed through the Linux software package management system. The Linux release moderator should have two major package management technical camps: deb of Debian, and Red Hat. rpm:

Package Management System Release (partial list)
Debian Style (. deb) Debian, Ubuntu, Xandros, Linspire
Red Hat Style (. rpm) Fedora, CentOS, Red Hat Enterprise Linux, OpenSUSE, Mandriva, PCLinuxOS

To put it bluntly, Ubuntu. deb is equivalent to CentOS. rpm is equivalent to Windows. .exe is equivalent to OSX. dmg.

Upper and lower layer software package tools

A software package management system usually consists of two types of tools: the underlying tool is used to install and delete Software Package files (rpm); the upper-layer tool completes metadata search and dependency parsing (yum ).

We can use yum and rpm to install software:

yum install package_namerpm -i package_file

 

 

However, yum downloads the software package from a resource library (repository) and installs it through full dependency parsing. This is why a bunch of related software is installed every time you run yum install; in rpm, You need to download an rpm file and then install it. If the rpm program finds that a dependency is missing, an error is reported and exit.

Resource Library (repository)

We mentioned that yum will download and install the software package from a resource library (repository). The repo in the title refers to the resource library, and its path is in/etc/yum. repos. d/. Let's see what is in this directory:

[root@n1 logos]# ls /etc/yum.repos.d/CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Media.repo  CentOS-Vault.repo  devtools-2.repo

 

Therefore, if you find that the corresponding package cannot be found in the yum install R error, it is because your resource library is not powerful enough and does not contain the R Software.

The official R language website introduces how to install R on Red Hat with the following sentence: "The Fedora RPMs for R have been ported to RHEL by the project Extra Packages for Enterprise Linux (EPEL )."

Google "EPEL", which can be viewed on EPEL's Chinese website: "The Enterprise Edition Linux additional software package (EPEL) is created, maintained, and managed by a special interest group, A high-quality additional software package project for Red Hat Enterprise Edition Linux (RHEL) and its derivative releases (such as CentOS, Scientific Linux, and Oracle Enterprise Linux."

That is to say, EPEL is a project that collects various additional software packages, and the R language is included in this project. We can install and enable the EPEL source using the following command:

yum install epel-release

 

In this case, we will find the directory/etc/yum. repos. d/There are two more. repo file epel. repo and epel-testing.repo, now run yum install R to install it!

This document describes The Chinese version of The Linux Command Line and The problems you encounter in your project. Of course, yum also has operations such as search, update, and delete. I believe everyone will use man to understand it and hope it will be helpful to everyone.

Related Article

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.