What does the following command mean?
$rpm-Va --nofiles --nodigest
I typed it first, but it didn't show anything, so I searched it.
--nodigest, do not inspect package headers or digest values
--nofiles, do not inspect file attributes in packages
[rpm]Install/uninstall RPM packages
I'm not sure, so what should I do if I want to cancel what I typed with this command?
Background
$sudo yum update
-// Abbreviated
-->Dependency resolution terminated.
Error: Package: uwsi-plugin-python36u-2.0.17.1-1.ius.el7.x86_64 (ius)
Request: uwsi-plugin-common=2.0.17.1
Deleting: uwsi-plugin-common-2.0.16-1.el7.x86_64 (@epel)
uwsgi-plugin-common=2.0.16-1.el7
Updated by: :uwsi-plugin-common-2.0.18-8.el7.x86_64(epel)
uwsgi-plugin-common=2.0.18-8.el7
Error: Package: uwsi-plugin-python36u-2.0.17.1-1.ius.el7.x86_64 (ius)
request:python36u
Deleting: python36u-3.6.4-1.ius.centos7.x86_64 (@ius)
python36u=3.6.4-1.ius.centos7
Removed by : python3-3.6.8-18.el7.x86_64 (updates)
US>Not Found
You can use --skip-broken to avoid problems.
You can try these: rpm -Va --nofiles --nodigest
Environment
CentOS Linux release 7.2.1511 (Core)
First, understand the options for the command.
$rpm-Va --nofiles --nodigest
The command is rpm
.I understand this.The following is a list of options that the rpm
command recognizes:
-Va
--nofiles
--nodigest
Are there three?No, this is wrong
Most Linux commands, including rpm
, provide an optional interpretation of traditional GNU/POSIX.This is derived from C's getopt()
and its GNU extension, getopt_long()
.Run man3getopt
to see what rules you want to interpret (with the man-pages-ja package, you should see a Japanese man).
There are detailed rules, but they are generally as follows.(There are other detailed rules and their own extensions)
-
and one hyphen and one or more alphanumeric options are short options.These are treated as optional characters at a time.Also, if the option takes an argument, you can add a character that follows it.
-x
→-x, one option-abc
→-a-b-c Three options-n 42
→-n means taking the argument of 42 (if -n takes the option)--
and two hyphens and one or more alphanumeric options are long options.These are one option for the string itself.Also, if the option takes an argument, =
followed by a letter.
--hoge
→--hoge, one option--fuga=42
→--fuga means that the option takes the argument of 42--
and only the two hyphens indicate the end of the option, followed by arguments to the normal command.(For example, if you create a touch
command named "-a", touch-a
interprets it as an option, so you can create it by using touch---a
.)-
and only one hyphen have no meaning as an option.However, in many programs, -
indicates standard input/output.-x
→-x, one option-abc
→-a-b-c Three options-n 42
→-n means taking the argument of 42 (if -n takes the option)--hoge
→--hoge, one option--fuga=42
→--fuga means that the option takes the argument of 42With these in mind, let's list the options again.
-V
-a
--nofiles
--nodigest
The difference I mentioned earlier was that instead of -Va
and one option, it was divided into two options: -V
and -a
.In other words,
$rpm-V-a --nofiles --nodigest
It's the same asNow I know what options are passed to rpm
.
Now run man rpm
.It contains all the meanings of the options.
-V
is an inspection option, and if you have -V
or --verify
, you want to inspect the package.
-a
means searching for all packages installed.This is an option for package search, but -V
can use the same option as package search and has the same meaning.In other words, when combined with -V
, it means inspecting all installed packages.
--nofiles
means that you do not inspect files in a package. The default behavior of -V
inspection checks whether the files in the specified package (RPM file) are installed correctly, the owner, and the size of the file.This --nofiles
prevents this file check.
--nodigest
means that it does not inspect digest values in packages or headers.By default, it looks for digest values, such as package files, to see if they are correct.This --nodigest
prevents you from looking for digest values and checking them.
-V
is an inspection option, and if you have -V
or --verify
, you want to inspect the package.
-a
means to search for all packages installed.This is an option for package search, but -V
can use the same option as package search and has the same meaning.In other words, when combined with -V
, it means inspecting all installed packages.
--nofiles
means that you do not inspect files in a package. The default behavior of -V
inspections is to determine if the files in the specified package (RPM file) are installed correctly, the actual file owner, and so on.This --nofiles
prevents this file check.
--nodigest
means that it does not inspect digest values in packages or headers.By default, it looks for digest values, such as package files, to see if they are correct.This --nodigest
prevents you from looking for digest values and checking them.
Digest values require hash functions such as MD5, SHA-1, SHA-256 (one of the SHA-2 versions).You can also check the commands such as md5sum
and sha256sum
.If the contents of the file are slightly different, the digest value will be very different.You can almost accurately determine if the file is corrupt by comparing the digest value you had previously asked for with the digest value you found from the actual file.(Digest values can conflict.In addition, a hash function called safety, such as SHA-256, should be used for improvement detection, but MD5, which is concerned about safety, is still sufficient for file corruption detection.A checksum like CRC can also verify file corruption, but CRC is also intended to allow error correction and is used differently.Some hash functions are not cryptographic hash functions, such as xxHash).
Now, I think I understand the meaning.This command has the following meanings:
"Check all installed packages.However, it does not check the files in the package.Also, it does not check digest values such as packages."
Checking installed files takes a lot of time because it checks almost every file.Also, finding digest values takes time because you need to load all the files.So what we're going to check is whether the dependencies are correct or the package management meta-information is corrupted.Even if you don't ask for a digest, you can check the size and existence of the file, so you can simply check if there is another file or if the file doesn't exist.
The -V
inspection displays messages only when there is a problem.If nothing is displayed, try removing --nofiles
and trying.You may see configuration files that you changed after installation.(If it is different from the installation, it should not be broken.This is because there may be changes to the configuration file after installation.Conversely, if there is a size difference or MD5 difference for binaries under /usr/bin, you should suspect that the file is corrupt.US>You need to have some knowledge of Linux to interpret the results of the file verification correctly.)
The reason why rpm-Va --nofiles --nodigest
command was executed when yum update
failed is that the dependency of the currently installed package may be broken (not determined to be broken).As a way to check it out, I'm asking you to try rpm-Va --nofiles --nodigest
.The Japanese translation is a little strange, so it's hard to understand, but I'm just teaching you how to check if there's anything wrong.Whether you do it or not, that doesn't solve the problem.However, if you see an error when you run it, it can help resolve the cause of the failure.
Finally, this command is only being inspected and does not modify anything or change any settings, so if you say "I want to undo what I typed with this command," there is nothing to undo, so there is nothing to undo.
Summary
rpm --help
provides a brief description of the options, and man rpm
provides a detailed description of the entire command.The information searched on the Internet may be outdated, environmentally specific, and may not be correct or accurate in the first place. (See below)Finally, be sure to specify the source of the quotation if you want to search and quote it. --nodigest
's does not inspect the package header or digest value page.This incorrect commentary is a unique text that cannot be considered coincidental and was found on the following site:
It may be a quote from one of the above, so please try to add the source of the quote to the question.
© 2024 OneMinuteCode. All rights reserved.