Solaris - Identificar à qual pacote de instalação pertence um arquivo
Eu já escrevi o procedimento para identificar à qual pacote (fileset) pertence um arquivo no Aix. Segue agora o procedimento equivalente para Solaris.
Como faço, por exemplo, para saber qual o pacote de instalação da biblioteca libgcc_s.so.1?
Tendo o arquivo instalado em uma máquina:
1 - Com o find eu localizo o arquivo:
# find / -name libgcc_s.so.1
/usr/local/lib/libgcc_s.so.1
/usr/local/lib/sparcv9/libgcc_s.so.1
/opt/sfw/gcc-3.2/lib/sparcv9/libgcc_s.so.1
/opt/sfw/gcc- 3.2/lib/libgcc_s.so.1
2 - Com o comando pkgchk eu identifico qual o pacote de instalação de um determinado arquivo.
Assim para saber o pacote correspondente ao arquivo /usr/local/lib/libgcc_s.so.1:
# pkgchk -l -p /usr/local/lib/libgcc_s.so.1
Pathname: /usr/local/lib/libgcc_s.so.1
Type: regular file
Expected mode: 0644
Expected owner: root
Expected group: bin
Expected file size (bytes): 169356
Expected sum(1) of contents: 21886
Expected last modification: Sep 12 06:48:00 2004
Referenced by the following packages:
SMCgcc342
Current status: installed
Da man page do comando, as opções utilizadas no exemplo acima:
-l
List information on the selected files that make up a
package. This option is not compatible with the -a,
-c, -f, -g, and -v options.
-p
path
Only check the accuracy of the path name or path
names listed.
path can be one or more path names separated
by commas (or by white space, if the list is quoted).
Para mais informações:
# man pkgchk


Discussion Area - Leave a Comment