美文网首页
安装软件常见问题汇总(不断更新)

安装软件常见问题汇总(不断更新)

作者: 曲凉不见 | 来源:发表于2020-03-16 17:04 被阅读0次

    1. 修改安装路径,避开root

    1.1 configure
    ./configure --prefix=./

    2. 报错说时间不对的

    make clean

    3. 缺少perl模块

    待定

    4. 解决非root用户yum安装问题

    比如想安装graphviz,可以这样查看
    yum list 'graphviz*'
    
    下载rpm包
    然后我们从仓库中下载rpm包,比如我们要下载graphviz.x86_64,我们可以这样下载:
    yumdownloader graphviz.x86_64 
    
    解压RPM包
    rpm2cpio graphviz-2.30.1-19.el7.x86_64.rpm |cpio -idvm
    
    添加环境变量
    如果解压的路径是在home目录的话,那么需要这样添加即可
    vim  ~/.bashrc
    export PATH=$PATH:$HOME/usr/bin/
    

    5. 找不到glib文件,比如:/lib64/libc.so.6: version `GLIBC_2.14' not found

    先查看现有情况
    ll /lib64/libc.so.6
    发现有一个了,只是版本不同,比如我现在有的是libc-2.12.so
    
    先去下载一个想要的版本:http://ftp.gnu.org/gnu/glibc/
    wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
    wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.14.tar.gz
    
    tar -xvf  glibc-2.14.tar.gz
    tar -xvf  glibc-ports-2.14.tar.gz
    mv glibc-ports-2.14 glibc-2.14/ports
    mkdir glibc-build-2.14
    cd glibc-build-2.14
    ../glibc-2.14/configure  --prefix=/path/to/this/directory/prefix
    #这里报了一个神奇的错误,说环境变量不能包括这个文件夹,解决办法:https://www.cnblogs.com/emanlee/p/7153212.html
    make
    make install
    
    ll  libc.so.6
    会出现这个libc.so.6 -> libc.so
    
    strings libc.so | grep GLIBC
    看到一长串文件
    
    修改软连接(往下我没办法进行,没有root权限;更换root权限后可操作)
    cp libc.so /lib64/libc-2.14.so #这里为了保持原有libc.so的内容
    rm -f /lib64/libc.so.6
    LD_PRELOAD=/lib64/libc-2.14.so ln -s /lib64/libc-2.14.so /lib64/libc.so.6
    

    以上完成后,用户一登录报错如下:
    -bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
    -bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
    -bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
    -bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
    -bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
    用locale命令查看,
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory

    继续解决这个问题:

    root下
    vi /etc/sysconfig/i18n
    添加两句话
    LC_ALL=C
    export LC_ALL
    保存后source /etc/sysconfig/i18n
    解决
    

    2021-01-15
    今天用miniconda3的时候又是上述语言报错出现了,查了一堆解决办法
    一说,每次运行前都要先运行两行

    export LC_ALL=en_US.utf-8
    export LANG=en_US.utf-8
    

    试了试,又报错

    $export LC_ALL=en_US.utf-8
    -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf-8): No such file or directory
    -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf-8)
    $export LANG=en_US.utf-8
    

    有人说,重新安装一个rpm即可
    rpm -ivh glibc-common-2.5-42.i386.rpm
    我没找到这个安装文件
    glib下载ftp地址:ftp://ftp.gnu.org/gnu/glibc/

    于是,找到了如下解决办法:

    针对ubuntu来说
    sudo locale-gen en_US.UTF-8
    或
    sudo  locale-gen
    重新编译该字符编码(我不是ubuntu,没有尝试是否可行)
    

    针对cenOS来说,没有locale-gen命令,于是借助了这个帖子:

    yum reinstall glibc-common
    又遇到新的问题
    Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
    Loading support for CentOS kernel ABI
    Setting up Reinstall Process
    Determining fastest mirrors
    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
     Eg. Invalid release/repo/arch combination/
    removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: base
    
    又继续找解决办法
    1. Go to /etc/yum.repos.d/ directory:
    cd /etc/yum.repos.d/
    
    2. Make copy of original file:
    cp CentOS-Base.repo CentOS-Base.repo.old
    
    3. Open and edit file with any text editor:
    vi CentOS-Base.repo
    
    4. Replace mirrorlist‘s
    Replace sections:
    [base]
    [updates]
    [extras]
    
    With following:
    [base]
    name=CentOS-$releasever - Base
    # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
    # baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
    baseurl=https://vault.centos.org/6.10/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    
    # released updates
    [updates]
    name=CentOS-$releasever - Updates
    # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
    # baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
    baseurl=https://vault.centos.org/6.10/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    
    # additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
    # baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
    baseurl=https://vault.centos.org/6.10/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    
    5. Clean yum cache
    yum clean all
    
    6. Run again yum update command:
    yum update
    

    到这为止,还是没有修改过来。。。。

    又过了几天,有一天修好了服务器的网络问题
    再次试一试yum

    yum install glibc-common
    

    相关文章

      网友评论

          本文标题:安装软件常见问题汇总(不断更新)

          本文链接:https://www.haomeiwen.com/subject/ggjpdhtx.html