AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 470266
Accepted
fanhualuojin154873
fanhualuojin154873
Asked: 2018-09-21 04:44:39 +0800 CST2018-09-21 04:44:39 +0800 CST 2018-09-21 04:44:39 +0800 CST

Como localizar um pacote instalado pelo yum?

  • 772

Eu uso yum list php-imaplistar o php-imap:

# yum list php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.zju.edu.cn
 * webtatic: sp.repo.webtatic.com
Installed Packages
php-imap.x86_64                        5.4.16-7.el7                        @epel

Mas como posso encontrar a localização dele? Eu sei que posso usar find / -name php-imappara pesquisar, mas é cada vez mais, mesmo o comando não tem reatividade.


No meu CentOS 7, /var/tmp/é um diretório vazio. e liste os /var/cache/yum/x86_64/7/são:

base epel extras mysql56-community mysql-connectors-community mysql-tools-community timedhosts timedhosts.txt updates webtatic. 

não há php-imap.

yum
  • 2 2 respostas
  • 18700 Views

2 respostas

  • Voted
  1. Best Answer
    Patrick Taylor
    2018-09-21T22:57:03+08:002018-09-21T22:57:03+08:00

    Se você quiser saber onde está o arquivo rpm, dependendo da configuração do yum, seu sistema pode ou não mantê-lo. Verifique /etc/yum.conf (não tenho certeza se este é o local correto em TODOS os sistemas, mas na minha caixa Centos este é o lugar certo) para a linha "cachedir=" e isso lhe dirá onde o cache de rpms está localizado. Por exemplo:

    grep cachedir /etc/yum.conf 
    

    Meu sistema diz /var/cache/yum/$basearch/$releasevar

    No mesmo arquivo, se keepcache=0 for incluído, seu sistema não salvará os rpms. Altere isso para keepcache=1 para mantê-los por perto. Dependendo do seu espaço de armazenamento, talvez seja necessário limpá-lo de vez em quando.

    Se você quiser saber onde o software real está em seu sistema, faça o seguinte:

    rpm -qa | grep php-imap
    

    Em seguida, pegue o nome do pacote do resultado (parece que pode ser php-imap.x86_64) e faça isso

    rpm -q --filesbypkg <package full name here>
    
    • 4
  2. user88036
    2018-09-21T05:10:57+08:002018-09-21T05:10:57+08:00

    Dado que sua pergunta é sobre os pacotes instalados usando yum, você deve verificar as opções infoe list"sub-flags". De acordo com Yumman :

           info           Display details about a package or group of packages 
           list   Is used to list various information about available packages;
    
            LIST OPTIONS
           The following are the ways which you can invoke yum in list mode.  Note that all list commands include information on the version of the package.
    
           OUTPUT
    
                  The format of the output of yum list is:
    
                  name.arch [epoch:]version-release  repo or @installed-from-repo
    
                  Note that if the repo cannot be determined, "installed" is printed instead.
    
           yum list [all | glob_exp1] [glob_exp2] [...]
                  List all available and installed packages.
    
           yum list available [glob_exp1] [...]
                  List all packages in the yum repositories available to be installed.
    
           yum list updates [glob_exp1] [...]
                  List all packages with updates available in the yum repositories.
    
           yum list installed [glob_exp1] [...]
                  List the packages specified by args.  If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed.
    
           yum list extras [glob_exp1] [...]
                  List the packages installed on the system that are not available in any yum repository listed in the config file.
    
           yum list distro-extras [glob_exp1] [...]
                  List the packages installed on the system that are not available, by name, in any yum repository listed in the config file.
    
           yum list obsoletes [glob_exp1] [...]
                  List the packages installed on the system that are obsoleted by packages in any yum repository listed in the config file.
    
           yum list recent
                  List packages recently added into the repositories. This is often not helpful, but what you may really want to use is "yum list-updateinfo new" from the security yum plugin.
    

    Além disso, o caminho para os pacotes instalados depende das configurações do seu sistema:

    Em Centos7

    /var/tmp/yum-root-xxxxx/ 
    

    ou

    /var/tmp/yum-username-xxxxx/
    

    ou

    /var/cache/yum/x86_64/7/program_name/packages/
    

    No RHEL, os arquivos são armazenados em

    /var/cache/yum/x86_64/6Server/rhel-6-server-rpms/packages/
    
    • 2

relate perguntas

  • Velocidades de download muito lentas com a instalação do yum

  • Ao atualizar um rpm instalado anteriormente com prefixos, como garantir que os mesmos prefixos sejam usados?

  • Por que remover o npm significa remover o nodejs também no CentOS?

  • yum + falha na descompactação do arquivo

  • Um pacote pode ser instalado, mas não visto pelos comandos yum ou rpm?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    ssh Não é possível negociar: "nenhuma cifra correspondente encontrada", está rejeitando o cbc

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    Como descarregar o módulo do kernel 'nvidia-drm'?

    • 13 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Wong Jia Hau ssh-add retorna com: "Erro ao conectar ao agente: nenhum arquivo ou diretório" 2018-08-24 23:28:13 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Bagas Sanjaya Por que o Linux usa LF como caractere de nova linha? 2017-12-20 05:48:21 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve