El lun, 10 ene 2022 a las 4:10, Jeffrey Walton (<[email protected]>)
escribió:
>
> Hi Everyone,
>
> I am working on OpenBSD 7.0, x86_64. I'm trying to script an install
> of developer tools I use, like GCC and Git. When I attempt to install
> GCC I am prompted:
>
>     $ sudo pkg_add gcc g++
>     quirks-4.54 signed on 2022-01-09T19:08:35Z
>     Ambiguous: choose package for gcc
>     a    0: <None>
>         1: gcc-8.4.0p9
>         2: gcc-11.2.0p0
>
> I've looked over the man page at https://man.openbsd.org/pkg_add, but
> I don't see an option to tell pkg_add to install the latest version of
> the package.
>
> How do I tell pkg_add to install the latest version without prompting me?
>

Not being ambiguous, i.e. with 'sudo pkg_add gcc-12.2.0p0'.

If you're looking forward to finding a one-liner able to install the
latest version on packages, I'm not aware of any standard way. Taking
output from 'pkg_info', filtering and feeding into 'pkg_add' should do the
trick.

Regards!

> Thanks in advance.
>

Reply via email to