You are not logged in.
When I install the software, there are a lot of dependency prompts. Is there any way to install the dependencies when installing the software?
Offline
Do you mean listings of optional dependencies for packages?
You can install them as dependencies by installing them and using the parameter --asdeps to pacman, this will mark them as installed as dependencies, so that they will be removed if all packages that depend on them are removed.
Say, if you install xarchiver, you'll have output like
...
Optional dependencies for xarchiver
arj: ARJ support
binutils: deb support [installed]
bzip2: bzip2 support [installed]
cpio: RPM support
gzip: gzip support [installed]
lha: LHA support [installed]
lrzip: lrzip support
lz4: LZ4 support [installed]
lzip: lzip support
lzop: LZOP support
p7zip: 7z support [installed]
tar: tar support [installed]
unarj: ARJ support
unrar: RAR support [installed]
unzip: ZIP support [installed]
xdg-utils: recognize more file types to open [installed]
xz: xz support [installed]
zip: ZIP support [installed]
zstd: zstd support [installed]
...
then if you want the arj package, you can install it as a dependency like this:
sudo pacman --asdeps -S arj
Last edited by Ferdinand (2021-12-18 12:38:19)
Offline
I mean, Install optional deps packages
...
Optional dependencies for xarchiver
arj: ARJ support ------------------------------------------------------|
binutils: deb support [installed] |
bzip2: bzip2 support [installed] |
cpio: RPM support |
gzip: gzip support [installed] |
lha: LHA support [installed] |
lrzip: lrzip support |
lz4: LZ4 support [installed] |
lzip: lzip support |
lzop: LZOP support |
p7zip: 7z support [installed] |------------- Install with these
tar: tar support [installed] |
unarj: ARJ support |
unrar: RAR support [installed] |
unzip: ZIP support [installed] |
xdg-utils: recognize more file types to open [installed] |
xz: xz support [installed] |
zip: ZIP support [installed] |
zstd: zstd support [installed] ---------------------------------------------------------------|
...
Last edited by Biaogo (2021-12-18 15:42:33)
Offline
No, there is no way to automatically pull in all optional deps.
Offline
No, there is no way to automatically pull in all optional deps.
OK, I'm trying to use this to filter out the contents of optional DEPs
LC_ALL=C pacman -Si python | awk -F'[:<=>]' '/^Optional/ {print $2}' | xargs -n1 | sort -u
Then use
Pacman $(code)
to install
But I don't know how to filter line breaks
...
Optional Deps : python-setuptools
python-pip
sqlite
mpdecimal: for decimal
xz: for lzma
tk: for tkinter
...
Last edited by Biaogo (2021-12-18 16:00:27)
Offline
Well, this is a bad idea, but if you really want to do that, use expac:
expac -S %o python
Did I mention, this is probably a bad idea?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Well, this is a bad idea, but if you really want to do that, use expac:
expac -S %o python
Did I mention, this is probably a bad idea?
thank you bro,But I need to search for dependencies of packages that are not installed
Last edited by Biaogo (2021-12-19 11:20:43)
Offline
And that's precisely what the command I provided will do.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline