• CentOS 出错处理


    1、yum install gcc时报错:

    报错内容:

    Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
    解决办法:

    源错误,替换源即可。参考出处:http://alsww.blog.51cto.com/2001924/614833

    *****************************Begin****************************

    首先,备份/etc/yum.repos.d/CentOS-Base.repo
    #cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
    #vim CentOS-Base.repo
    清空内容,并加入以下内容:

    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client. You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the
    # remarked out baseurl= line instead.
    #
    #

    [base]
    name=CentOS-$releasever - Base - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #released updates
    [updates]
    name=CentOS-$releasever - Updates - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #packages used/produced in the build but not released
    [addons]
    name=CentOS-$releasever - Addons - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib - 163.com
    baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

    ***************************End*******************************

    2、安装程序configure的时候就遇到了这个问题

    报错:no acceptable C compiler found in $PATH

    解决方法:yum install gcc

    安装更新了如下几个组件:

    (1/10): libgomp-4.4.6-3.el5.1.i386.rpm                   |  72 kB     00:00    
    (2/10): libgcc-4.1.2-52.el5_8.1.i386.rpm                 |  97 kB     00:00    
    (3/10): nscd-2.5-81.el5_8.7.i386.rpm                     | 172 kB     00:00    
    (4/10): glibc-headers-2.5-81.el5_8.7.i386.rpm            | 607 kB     00:02    
    (5/10): kernel-headers-2.6.18-308.13.1.el5.i386.rpm      | 1.3 MB     00:03    
    (6/10): glibc-devel-2.5-81.el5_8.7.i386.rpm              | 2.1 MB     00:05    
    (7/10): cpp-4.1.2-52.el5_8.1.i386.rpm                    | 2.7 MB     00:06    
    (8/10): gcc-4.1.2-52.el5_8.1.i386.rpm                    | 5.2 MB     00:16    
    (9/10): glibc-2.5-81.el5_8.7.i686.rpm                    | 5.4 MB     00:17    
    (10/10): glibc-common-2.5-81.el5_8.7.i386.rpm            |  16 MB     00:43

    出处:http://blog.is36.com/pack_gcc/

    3、在执行一个任务时,想要切换前后台

    解决方法:Ctrl+z使得正在执行的job变成stop状态,而后通过bg命令使其后台执行,fg命令前台执行

    ps用了查看正在执行的jobs

    image

    4、在运行yum install gcc时遇到的问题

    报错:warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897

    参考资料:http://buzhizhe.blog.51cto.com/1007658/815579

                 http://www.blogjava.net/zhyiwww/archive/2012/03/15/371932.html 

    解决方法:rpm --import /etc/pki/rpm-gpg/RPM*

    RPM-GPG-KEY-CentOS-5

    如果是低版本,可以使用

    RPM-GPG-KEY-centos4

  • 相关阅读:
    Ubuntu 16.04 LTS nodejs+pm2+nginx+git 基础安装及配置环境(未完,未整理)
    JavaScript 二、eval 和 with 函数
    JavaScript 一、 ES6 声明变量,作用域理解
    UNMET PEER DEPENDENCY @angular/common@2.3.1
    Laravel Homestead 离线安装
    mac os x 记录 转载
    Ubuntu 16.04 LTS 完善解决亮度调整
    oh my zsh 切换 bash
    关于bitmap储存图片报内存不足的问题
    .net操作sqlserver数据库
  • 原文地址:https://www.cnblogs.com/dorothychai/p/2670335.html
Copyright © 2020-2023  润新知