首页 > 编程知识 正文

yum安装命令,linux安装java

时间:2023-05-03 18:53:06 阅读:36051 作者:79

注意!

系统是centOS 7,手贱卸掉了yum,后面什么包都装不上了,开始想办法重新安装yum。废话不多说,每一条命令按顺序执行就行

先通过网址下载安装包,总共下四个,出现任何404 not FOUND,都是包发布了新版本,在地址: http://mirrors.163.com/centos/7/os/x86_64/Packages/ 查看新的版本号修改一下就行。

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpmwget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpmwget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpmwget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-auto-update-debug-info-1.1.31-54.el7_8.noarch.rpm

再通过rpm顺序安装下载的包

rpm -ivh --force --nodeps python-iniparse-0.4-9.el7.noarch.rpmrpm -ivh --force --nodeps yum-metadata-parser-1.1.4-10.el7.x86_64.rpmrpm -ivh --force --nodeps yum-3.4.3-168.el7.centos.noarch.rpmrpm -ivh --force --nodeps yum-plugin-auto-update-debug-info-1.1.31-54.el7_8.noarch.rpm

输入yum查看是否安装成功

Loaded plugins: auto-update-debuginfoYou need to give some commandUsage: yum [options] COMMANDList of Commands:check Check for problems in the rpmdbcheck-update Check for available package updatesclean Remove cached datadeplist List a package's dependenciesdistribution-synchronization Synchronize installed packages to the latest available versionsdowngrade downgrade a packageerase Remove a package or packages from your systemfs Acts on the filesystem data of the host, mainly for removing docs/lanuages for minimal hosts.fssnapshot Creates filesystem snapshots, or lists/deletes current snapshots.groups Display, or use, the groups informationhelp Display a helpful usage messagehistory Display, or use, the transaction historyinfo Display details about a package or group of packagesinstall Install a package or packages on your systemlist List a package or groups of packagesload-transaction load a saved transaction from filenamemakecache Generate the metadata cacheprovides Find what package provides the given valuereinstall reinstall a packagerepo-pkgs Treat a repo. as a group of packages, so we can install/remove all of themrepolist Display the configured software repositoriessearch Search package details for the given stringshell Run an interactive yum shellswap Simple way to swap packages, instead of using shellupdate Update a package or packages on your systemupdate-minimal Works like upgrade, but goes to the 'newest' package match which fixes a problem that affects your systemupdateinfo Acts on repository update informationupgrade Update packages taking obsoletes into accountversion Display a version for the machine and/or available repos.Options: -h, --help show this help message and exit -t, --tolerant be tolerant of errors -C, --cacheonly run entirely from system cache, don't update cache -c [config file], --config=[config file] config file location -R [minutes], --randomwait=[minutes] maximum command wait time -d [debug level], --debuglevel=[debug level] debugging output level --showduplicates show duplicates, in repos, in list/search commands -e [error level], --errorlevel=[error level] error output level --rpmverbosity=[debug level name] debugging output level for rpm -q, --quiet quiet operation -v, --verbose verbose operation -y, --assumeyes answer yes for all questions --assumeno answer no for all questions --version show Yum version and exit --installroot=[path] set install root --enablerepo=[repo] enable one or more repositories (wildcards allowed) --disablerepo=[repo] disable one or more repositories (wildcards allowed) -x [package], --exclude=[package] exclude package(s) by name or glob --disableexcludes=[repo] disable exclude from main, for a repo or for everything --disableincludes=[repo] disable includepkgs for a repo or for everything --obsoletes enable obsoletes processing during updates --noplugins disable Yum plugins --nogpgcheck disable gpg signature checking --disableplugin=[plugin] disable plugins by name --enableplugin=[plugin] enable plugins by name --skip-broken skip packages with depsolving problems --color=COLOR control whether color is used --releasever=RELEASEVER set value of $releasever in yum config and repo files --downloadonly don't update, just download --downloaddir=DLDIR specifies an alternate directory to store packages --setopt=SETOPTS set arbitrary config and repo options --bugfix Include bugfix relevant packages, in updates --security Include security relevant packages, in updates --advisory=ADVS, --advisories=ADVS Include packages needed to fix the given advisory, in updates --bzs=BZS Include packages needed to fix the given BZ, in updates --cves=CVES Include packages needed to fix the given CVE, in updates --sec-severity=SEVS, --secseverity=SEVS Include security relevant packages matching the severity, in updates

结束

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。