用yum 安装 gnuplot-py

本文介绍了解决Python升级后遇到的YUM无法正常使用的问题,包括修改脚本指向旧版本Python、解决权限问题、修复错误的软件源配置等步骤。
1. 如果 python 升级了, yum 不能用, 会报 No module named yum .
把 /usr/bin/yum 脚本第一行 #! /usr/bin/python 改到旧版本
2. 运行 yum search gnuplot 报错
no access to //var/log/yumcache
yum 需要 sudo 运行
3. 如果某个 repo 错误,会引起其他 repo 也不对
4. 拷贝了一个好的 repo , rhel4
[dag]
name=Dag RPM Repository for RHEL4
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el4/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

5. sudo yum install gnuplot-py

找到 python 的安装路径。
python
import sys
pring sys.path
MG5_aMC>install mg5amc_py8_interface You are installing 'mg5amc_py8_interface', please cite ref(s): arXiv:1410.3012, arXiv:XXXX.YYYYY. Downloading the HEPToolInstaller at: http://madgraph.mi.infn.it//Downloads/HEPToolsInstaller/HEPToolsInstaller_V168.tar.gz ========== The optional dependency 'gnuplot' for the tool 'mg5amc_py8_interface' was not found. We recommend that you install it so as to be able to view the plots related to merging with Pythia 8. ========== Now installing mg5amc_py8_interface. Be patient... /home/z/tools/MG5/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:16: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.version import LooseVersion Fetching data with command: wget --no-check-certificate http://madgraph.mi.infn.it//Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.3.tar.gz --2025-11-11 10:23:02-- http://madgraph.mi.infn.it//Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.3.tar.gz 正在解析主机 madgraph.mi.infn.it (madgraph.mi.infn.it)... 192.135.21.75 正在连接 madgraph.mi.infn.it (madgraph.mi.infn.it)|192.135.21.75|:80... 已连接。 已发出 HTTP 请求,正在等待回应... 302 Found 位置:https://madgraph.mi.infn.it//Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.3.tar.gz [跟随至新的 URL] --2025-11-11 10:23:03-- https://madgraph.mi.infn.it//Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.3.tar.gz 正在连接 madgraph.mi.infn.it (madgraph.mi.infn.it)|192.135.21.75|:443... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度: 20494 (20K) [application/x-gzip] 正在保存至: ‘MG5aMC_PY8_interface_V1.3.tar.gz’ MG5aMC_PY8_interfac 100%[===================>] 20.01K 95.7KB/s 用时 0.2s 2025-11-11 10:23:05 (95.7 KB/s) - 已保存 ‘MG5aMC_PY8_interface_V1.3.tar.gz’ [20494/20494]) Installing tool 'mg5amc_py8_interface'... > Follow the installation progress by running the command below in a separate terminal) > tail -f /home/z/tools/MG5/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log RETURN CODE AT PYTHON: 9 > A problem occured during the installation of 'mg5amc_py8_interface'. > Return code of the installation is 9 > See installation log at '/home/z/tools/MG5/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log' Command "install mg5amc_py8_interface" interrupted with error: InvalidCmd : Installation of mg5amc_py8_interface failed.有相关问题的解决方案吗
最新发布
11-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值