AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[yum](computer)

Martin Hope
user988346
Asked: 2022-08-12 09:10:57 +0800 CST

可以假设“yum check-update”在没有 root 的情况下运行时准确吗?

  • 6

可以假设“yum check-update”在没有 root 的情况下运行时准确吗?人们建议不要运行“yum makecache”,并说其他 yum 命令会更新缓存。当我查找有关缓存的信息时,我发现一些东西甚至说它默认是关闭的......所以因为运行“yum check-update”的正确方法是运行它,如果我以非 root 身份运行用户它会做一些事情来更新缓存,或者告诉我它是否已经过时,或者是什么?

在 debian 世界中,我认为这不是真的。如果我想要最新信息,必须运行“apt update”。有些脚本会定期同步此信息,以便它可以告诉您什么时候过时,但这些脚本以 root 身份运行,并且在某些环境(如 docker 映像)中,无论如何您都需要运行“apt update”。

如果答案是肯定的,它是如何工作的?是否有一个 setuid 文件允许非 root 用户使用刷新的缓存或其他东西?

yum
  • 1 个回答
  • 43 Views
Martin Hope
Thagor
Asked: 2021-09-04 02:17:33 +0800 CST

在我的 centos 8 VM 上安装 docker 时遇到问题

  • 5

我的开发机器是 CentOS 8 虚拟机,我正在尝试在其上安装 docker,因此我可以在本地创建 docker 映像。我基本上在这里遵循 docker 教程:https ://docs.docker.com/engine/install/centos/

我添加了 docker repo,我需要禁用一些包,因为存在冲突。但现在我被困在这部分:

$ sudo yum install docker-ce docker-ce-cli containerd.io

带有以下错误消息:

Running transaction check
No available modular metadata for modular package 'container-selinux-2:2.155.0-1.module_el8.3.0+699+d61d9c41.noarch', it cannot be installed on the system
No available modular metadata for modular package 'fuse-overlayfs-1.3.0-2.module_el8.3.0+699+d61d9c41.x86_64', it cannot be installed on the system
No available modular metadata for modular package 'libslirp-4.3.1-1.module_el8.3.0+475+c50ce30b.x86_64', it cannot be installed on the system
No available modular metadata for modular package 'slirp4netns-1.1.8-1.module_el8.3.0+699+d61d9c41.x86_64', it cannot be installed on the system
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: No available modular metadata for modular package

我试过了$ sudo dnf clean all,$ sudo yum clean packages但无济于事。

我对 yum 和 CentOS 不是很熟悉,所以也许我遗漏了一些微不足道的东西。

docker yum
  • 1 个回答
  • 728 Views
Martin Hope
Tiina
Asked: 2021-01-07 01:21:34 +0800 CST

为什么 rpm 失败但 yum 为相同的下载 rpm 工作

  • 5

为了离线安装 libpcap-devel,我使用yum install -y --downloadonly --downloaddir=. libpcap-devel并获得了 2 个 rpm:libpcap-1.5.3-12.el7.x86_64.rpm libpcap-devel-1.5.3-12.el7.x86_64.rpm

然后我用rpm -ivh libpcap-1.5.3-12.el7.x86_64.rpm了,上面写着

正在准备... ################################ [100%] 文件 /usr/lib64/libpcap.so .1.5.3 来自安装 libpcap-14:1.5.3-12.el7.x86_64 与包 libpcap-14:1.5.3-11.el7.x86_64 中的文件冲突

我想这意味着 libpcap.so.1.5.3 已经安装在 /usr/lib64 了,它是 1.5.3-11.el7.x86_64

然后我用rpm -ivh libpcap-devel-1.5.3-12.el7.x86_64.rpm它说:

错误:依赖项失败:libpcap-devel-14:1.5.3-12.el7.x86_64 需要 libpcap = 14:1.5.3-12.el7

然后我用yum localinstall libpcap-devel-1.5.3-12.el7.x86_64.rpm,成功了。我的问题是,为什么相同的 libpcap-devel-12 rpm,rpm 命令需要 libpcap = 14:1.5.3-12.el7,而 yum 命令接受 libpcap.so,即 14:1.5.3-11.el7

centos yum
  • 1 个回答
  • 113 Views
Martin Hope
Ivan Off
Asked: 2020-02-06 20:45:54 +0800 CST

无法在 Centos 7 上安装 php-devel

  • 5
Error: Package: php-devel-7.4.2-1.el7.remi.x86_64 (remi-php74)
           Requires: php-cli(x86-64) = 7.4.2-1.el7.remi
           Installed: php-cli-7.4.3~RC1-1.el7.remi.x86_64 (@remi-modular-test)
               php-cli(x86-64) = 7.4.3~RC1-1.el7.remi
           Available: php-cli-5.4.16-46.el7.x86_64 (base)
               php-cli(x86-64) = 5.4.16-46.el7
           Available: php-cli-5.4.16-46.1.el7_7.x86_64 (updates)
               php-cli(x86-64) = 5.4.16-46.1.el7_7
           Available: php-cli-5.4.45-17.el7.remi.x86_64 (remi)
               php-cli(x86-64) = 5.4.45-17.el7.remi
           Available: php-cli-5.4.45-18.el7.remi.x86_64 (remi)
               php-cli(x86-64) = 5.4.45-18.el7.remi
           Available: php-cli-5.5.38-11.el7.remi.x86_64 (remi-php55)
               php-cli(x86-64) = 5.5.38-11.el7.remi
           Available: php-cli-5.5.38-12.el7.remi.x86_64 (remi-php55)
               php-cli(x86-64) = 5.5.38-12.el7.remi
           Available: php-cli-5.6.40-16.el7.remi.x86_64 (remi-php56)
               php-cli(x86-64) = 5.6.40-16.el7.remi
           Available: php-cli-5.6.40-17.el7.remi.x86_64 (remi-php56)
               php-cli(x86-64) = 5.6.40-17.el7.remi
           Available: php-cli-7.4.1-1.el7.remi.x86_64 (remi-php74)
               php-cli(x86-64) = 7.4.1-1.el7.remi
           Available: php-cli-7.4.2-1.el7.remi.x86_64 (remi-php74)
               php-cli(x86-64) = 7.4.2-1.el7.remi

我需要在 centos 机器上部署我的网站。由于某种原因,客户在此处安装了 7.4 版本的 php。我已经有 php-cli 工作,但包管理器仍然无法安装 php-devel 包。当我运行时php-cli-7.4.1-1.el7.remi.x86_64,它说该软件包已安装。当我尝试卸载当前安装的包时,它会询问我是否要删除所有 php 包。那我该怎么办?

centos yum
  • 1 个回答
  • 1603 Views
Martin Hope
Stanislav C.
Asked: 2019-10-23 23:24:35 +0800 CST

添加 Remi 存储库时“请求的数据类型主要不可用”

  • 5

在我们的日常自动测试中,我们使用 Ansible 从 Remi 的存储库安装 PHP 7.3。通常它工作正常,但有时(一个月几次)它会失败,并出现如下错误:

fatal: [vm1.int.zone]: FAILED! => {
"changed": false, 
"invocation": {
    "module_args": {
        "allow_downgrade": false, 
        "conf_file": null, 
        "disable_gpg_check": false, 
        "disable_plugin": [], 
        "disablerepo": null, 
        "enable_plugin": [], 
        "enablerepo": "epel,remi,remi-php73", 
        "exclude": null, 
        "install_repoquery": true, 
        "installroot": "/", 
        "list": null, 
        "name": [
            "php", 
            "php-mcrypt", 
            "php-mbstring", 
            "php-xml", 
            "php-xsl", 
            "php-xmlrpc", 
            "php-pdo", 
            "php-cli", 
            "php-pgsql", 
            "php-pspell", 
            "php-pecl-ssh2", 
            "php-pecl-zip", 
            "php-smbclient", 
            "php-intl", 
            "php-mysql", 
            "php-curl", 
            "php-xdebug", 
            "php-process"
        ], 
        "security": false, 
        "skip_broken": false, 
        "state": "installed", 
        "update_cache": false, 
        "update_only": false, 
        "validate_certs": true
    }
}, 
"msg": "Failure talking to yum: requested datatype primary not available"

有 3 个 Remi 存储库:

# ll -d /var/cache/yum/x86_64/7/remi*
drwxr-xr-x 4 root root 4096 Oct 22 22:12 /var/cache/yum/x86_64/7/remi
drwxr-xr-x 4 root root 4096 Oct 22 22:12 /var/cache/yum/x86_64/7/remi-php73
drwxr-xr-x 4 root root 4096 Oct 22 22:12 /var/cache/yum/x86_64/7/remi-safe

如果运行某些 yum 命令,其中任何一个都会导致问题,例如:

# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror2.int.zone
 * epel: mirror2.int.zone
 * extras: mirror2.int.zone
 * remi-safe: mirror.serverion.com
 * updates: mirror2.int.zone
Error: requested datatype primary not available

如果禁用 Remi 的存储库,一切正常。问题在于 Remi 存储库的缓存损坏,例如:

# ll /var/cache/yum/x86_64/7/remi-php73/
total 20
-rw-r--r-- 1 root root    0 Oct 22 22:12 cachecookie
drwxr-xr-x 2 root root 4096 Oct 22 22:12 gen
-rw-r--r-- 1 root root 2996 Oct 22 22:12 mirrorlist.txt
drwxr-xr-x 2 root root 4096 Oct 22 22:12 packages
-rw-r--r-- 1 root root 2259 Oct 22 22:12 repomd.xml

# ll /var/cache/yum/x86_64/7/remi-php73/gen/
total 0

通常,此目录如下所示:

# ll /var/cache/yum/x86_64/7/remi-php73/
total 232
-rw-r--r-- 1 root root 211219 Oct 22 14:03 7042a64df80e22496ef9a31990242357a84898e0f0272915cf7cce20b705d863-primary.sqlite.bz2
-rw-r--r-- 1 root root      0 Oct 23 04:24 cachecookie
drwxr-xr-x 2 root root   4096 Oct 23 04:24 gen
-rw-r--r-- 1 root root   2996 Oct 23 04:24 mirrorlist.txt
drwxr-xr-x 2 root root   4096 Oct 23 04:25 packages
-rw-r--r-- 1 root root   3095 Oct 22 14:03 repomd.xml

# ll /var/cache/yum/x86_64/7/remi-php73/gen/
total 996
-rw-r--r-- 1 root root 1015808 Oct 22 14:03 primary_db.sqlite

所以文件{long_id}-primary.sqlite.bz2和gen/primary_db.sqlite有时会因为某种原因丢失。

问题是这可能是什么原因?

centos yum
  • 1 个回答
  • 936 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve