at the beginning, i installed mariadb based on a blog
pacman -S mysql
and it told me to choose from âmariadbâ âmariadbLTSâ and another one(i forgot it). I chose âmariadbâ. After completed, I ran the folloing command
itâs an unknown option - that switch simply doesnât exist
(maybe it did in the past, but not anymore - I donât know)
the program doesnât know what to do with it âŚ
The conclusion would be:
that post contains inaccurate information.
Note that relying on random articles regarding this is highly discourages. I mean this:
pacman -S mysql
âŚwill not install MariaDB. In fact, I couldnât even find a package by that name in the repositories. So that command probably didnât install anything.
Indeed no such package existsâŚitâs not a metapackage or a groupâŚyet it did what the OP said it did.
$ sudo pacman -S mysql
:: There are 3 providers available for mysql:
:: Repository extra
1) mariadb 2) mariadb-lts 3) percona-server
The reason seems to be in the man page.
Packages that provide other packages are also handled. For example, pacman -S foo will first look for a foo package. If foo is not found, packages that provide the same functionality as foo will be searched for. If any package is found, it will be
installed. A selection prompt is provided if multiple packages providing foo are found.
@ whoever may be interested
pacman's man page seems to be incomplete regarding searching
A regex search brings up the same options.
# ^ is the start of a line or string
# $ is the end of a line or string
# both the name and description are searched
# but none should match
# unless the description is tokenised
$ pacman -Ss ^mysql$
extra/mariadb 11.3.2-1
Fast SQL database server, derived from MySQL
extra/mariadb-lts 11.2.3-1
Fast SQL database server, derived from MySQL (LTS)
extra/percona-server 8.1.0_1-3
Drop-in replacement for MySQL that provides improved performance, diagnostics, instrumentation and MyRocks storage engine
# it's case insensitive
# but the description is not tokenised
$ pacman -Ss Mozilla.org$
extra/firefox 124.0.1-1 [installed]
Standalone web browser from mozilla.org
extra/thunderbird 115.9.0-1 [installed]
Standalone mail and news reader from mozilla.org
$ pacman -Ss ^Mozilla.org$
# the only mention of mariadb for percona
# is in the provides field
$ pacman -Ss ^mariadb$
extra/mariadb 11.3.2-1 [installed]
Fast SQL database server, derived from MySQL
extra/mariadb-lts 11.2.3-1
Fast SQL database server, derived from MySQL (LTS)
extra/percona-server 8.1.0_1-3
Drop-in replacement for MySQL that provides improved performance, diagnostics, instrumentation and MyRocks storage engin
The man page only says the package name and description are searched, however the above seems to suggest that the provides field is also searched. Unless something else is going on.
-s, --search
This will search each package in the sync databases for names or descriptions that match regexp. When you include multiple search terms, only packages with descriptions matching ALL of those terms will be returned.
EDIT:
Thank you for the solutionâŚbut Iâm not sure how my post solved your issueâŚ
Everyone else provided a solution, I think @Nachleseâs 2nd post has the best explanation and a good link (everyone gave goods links though).