Solved Installing two conflicting packages - mariadb

Hello,

I am trying to install a small application that uses both mariadb102-server-10.2.13 and the mysql-connector-c++ but every time I try it it wants to remove one or the other. How can I force install both of these packages?

Installed packages to be REMOVED:
mariadb102-server-10.2.13
mariadb102-client-10.2.13

New packages to be INSTALLED:
mysql-connector-c++: 1.1.9_2
mysql56-client: 5.6.39


I also tried mariadb-connector-c but it also wants to uninstall these

Installed packages to be REMOVED:
mariadb102-server-10.2.13
mariadb102-client-10.2.13

New packages to be INSTALLED:
mariadb-connector-c: 3.02_1


I need to install mariadb102-client-10.2.13 AND mysql-connector-c++.

Thanks for any help you can give.
 
If you were building from ports, then you would need:

Code:
DEFAULT_VERSIONS+= mysql=10.2m

in /etc/make.conf

Not sure how or if you can do that with pkg.
 
You probably can't force this because the MySQL connector most likely depends on MySQL itself and that cannot be co-installed with MariaDB as far as I know because both install binaries to the same locations.
 
thank you for the replys.

I cannot understand why the mariadb connector (c++ interface) cannot be installed with the mariadb102 server.

Installed packages to be REMOVED:
mariadb102-server-10.2.13
mariadb102-client-10.2.13

New packages to be INSTALLED:
mariadb-connector-c: 3.02_1
 
I cannot understand why the mariadb connector (c++ interface) cannot be installed with the mariadb102 server.
First it's important to determine how you're trying to install these. Are you using binary packages or are you using the ports collection? And if its the latter then what did you configure in /etc/make.conf?

Because by default the connector doesn't seem to rely on any specific database package:

Code:
$ make run-depends-list && make build-depends-list
/usr/ports/ftp/curl
/usr/ports/converters/libiconv
/usr/ports/ports-mgmt/pkg
/usr/ports/devel/cmake
/usr/ports/devel/ninja
/usr/ports/ftp/curl
/usr/ports/converters/libiconv
So either you have something specific configured in /etc/make.conf or you're trying to combine binary packages with ports, which is usually a bad idea due to dependency issues.
 
It can, but you are installing the pre-built binary packages and the mysql-connector-c++ package was built with mysql (not mariadb or percona) as the default mysql version. That's why installing it removes the mariadb server/client packages because mysql-connector-c++ needs mysql, not mariadb as its default mysql version.

You can either start building ports or dump mariadb for mysql.

I use percona and build all my ports and was able to make a mysql-connector-c++ package for percona, since that's my default mysql version, so it should also work for mariadb...
 
What's the full command that you are running? There are no dependencies registered for the connector, so there must be something else that you are trying to install that's conflicting:
Code:
$ sudo pkg install mariadb-connector-c
Password:
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB   6.1MB/s    00:01    
Processing entries: 100%
FreeBSD repository update completed. 28737 packages processed.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mariadb-connector-c: 3.0.2_1
    curl: 7.58.0
    libnghttp2: 1.29.0

Number of packages to be installed: 3

The process will require 5 MiB more space.
1 MiB to be downloaded.

Proceed with this action? [y/N]:

Code:
$ sudo pkg install mariadb-connector-c mariadb100-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mariadb-connector-c: 3.0.2_1
    mariadb100-server: 10.0.34
    curl: 7.58.0
    libnghttp2: 1.29.0
    mariadb100-client: 10.0.34

Number of packages to be installed: 5

The process will require 199 MiB more space.
24 MiB to be downloaded.

Proceed with this action? [y/N]:

Code:
$ sudo pkg install mariadb-connector-c mariadb102-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 7 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mariadb-connector-c: 3.0.2_1
    mariadb102-server: 10.2.13
    curl: 7.58.0
    libnghttp2: 1.29.0
    libedit: 3.1.20170329_2,1
    unixODBC: 2.3.4
    mariadb102-client: 10.2.13

Number of packages to be installed: 7

The process will require 242 MiB more space.
33 MiB to be downloaded.

Proceed with this action? [y/N]:
 
It's the USES = line in the port's makefile that requires mysql, and then that's where the mysql version (mariadb, perconadb or mysql (oracle)) comes into play:
Code:
USES=           cmake:outsource compiler:features mysql ssl

Since it seems he's using packages, the default mysql version is mysql (oracle), but he has mariadb client and server installed. Most likely, this is the first package being installed that needs mysql (oracle) installed. Same thing would happen if he tried to install any package that uses mysql (oracle) as the default mysql in make.conf, such as databases/p5-DBD-mysql, databases/php56-mysqli and others.
 
Except that this isn't there for the MariaDB connector:

Code:
unicron:/usr/ports/databases/mariadb-connector-c $ grep -i uses Makefile
USES=           cmake compiler:c++11-lib iconv:translit ssl

I did spot it for the MySQL connector but the OP's last question was explicitly about the relationship between the MariaDB connector and the server.
 
I was looking at mysql-connector-c++ because that's the pkg he's trying to install ;) There is no mariadb-connector-c++ package.

mysql-connector-c++ requires libmysqlclient.so.18 which is part of mysql56-client. That's why the package is trying to remove mariadb*.* packages and install mysql*.* packages.
 
Hello,

I am trying to install a small application that uses both mariadb102-server-10.2.13 and the mysql-connector-c++ but every time I try it it wants to remove one or the other. How can I force install both of these packages?

Code:
Installed packages to be REMOVED:
    mariadb102-server-10.2.13
    mariadb102-client-10.2.13

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mysql56-client: 5.6.39

I also tried mariadb-connector-c but it also wants to uninstall these

Code:
Installed packages to be REMOVED:
    mariadb102-server-10.2.13
    mariadb102-client-10.2.13

New packages to be INSTALLED:
    mariadb-connector-c: 3.02_1

I need to install mariadb102-client-10.2.13 AND mysql-connector-c++.

Thanks for any help you can give.

What is the complete command-line that you are trying to run, because it works for me.

Just the mysql-connector-c++, which wants to pull in the mysql56-client package:
Code:
$ sudo pkg install mysql-connector-c++
Password:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1

Number of packages to be installed: 5

The process will require 193 MiB more space.
12 MiB to be downloaded.

Proceed with this action? [y/N]: n

The mysql-connector-c++ and just the mariadb102-client, which also pulls in mysql56-client:
Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 6 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mariadb102-client: 10.2.13
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1

Number of packages to be installed: 6

The process will require 224 MiB more space.
14 MiB to be downloaded.

Proceed with this action? [y/N]: n

The connector, the client, and the mariadb102-server:
Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client mariadb102-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mariadb102-client: 10.2.13
    mariadb102-server: 10.2.13
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1
    unixODBC: 2.3.4

Number of packages to be installed: 8

The process will require 430 MiB more space.
44 MiB to be downloaded.

Proceed with this action? [y/N]: n

And let's do all of the above with the mariadb-connector-c as well:
Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client mariadb102-server mariadb-connector-c
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mariadb102-client: 10.2.13
    mariadb102-server: 10.2.13
    mariadb-connector-c: 3.0.2_1
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1
    unixODBC: 2.3.4
    curl: 7.58.0
    libnghttp2: 1.29.0

Number of packages to be installed: 11

The process will require 434 MiB more space.
45 MiB to be downloaded.

Proceed with this action? [y/N]: n
 
if you answered Y to proceed, you would find that there would be conflicts:

Code:
...
Checking integrity... done (2 conflicting)
  - mariadb-connector-c-3.0.2_1 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/mariadb_config
  - mysql56-client-5.6.39 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/msql2mysql
  Cannot solve problem using SAT solver, trying another plan
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 17 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        icu: 60.2_1,1
        perl5: 5.24.3
        libevent: 2.1.8_1
        libedit: 3.1.20170329_2,1
        liblz4: 1.8.0,1
        libnghttp2: 1.29.0
        ca_root_nss: 3.36
        boost-libs: 1.65.1_1
        mysql56-client: 5.6.39
        indexinfo: 0.3.1
        libiconv: 1.14_11
        curl: 7.58.0
        mysql-connector-c++: 1.1.9_2
        mariadb-connector-c: 3.0.2_1
        readline: 7.0.3_1
        libxml2: 2.9.7
        unixODBC: 2.3.4

Note that after the integrity checking is done, mariadb102-client has been replaced with mysql56-client.
 
What is the complete command-line that you are trying to run, because it works for me.

Just the mysql-connector-c++, which wants to pull in the mysql56-client package:
Code:
$ sudo pkg install mysql-connector-c++
Password:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1

Number of packages to be installed: 5

The process will require 193 MiB more space.
12 MiB to be downloaded.

Proceed with this action? [y/N]: n

The mysql-connector-c++ and just the mariadb102-client, which also pulls in mysql56-client:
Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 6 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mariadb102-client: 10.2.13
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1

Number of packages to be installed: 6

The process will require 224 MiB more space.
14 MiB to be downloaded.

Proceed with this action? [y/N]: n

The connector, the client, and the mariadb102-server:
Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client mariadb102-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mariadb102-client: 10.2.13
    mariadb102-server: 10.2.13
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1
    unixODBC: 2.3.4

Number of packages to be installed: 8

The process will require 430 MiB more space.
44 MiB to be downloaded.

Proceed with this action? [y/N]: n

And let's do all of the above with the mariadb-connector-c as well:
Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client mariadb102-server mariadb-connector-c
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    mysql-connector-c++: 1.1.9_2
    mariadb102-client: 10.2.13
    mariadb102-server: 10.2.13
    mariadb-connector-c: 3.0.2_1
    boost-libs: 1.65.1_1
    mysql56-client: 5.6.39
    libedit: 3.1.20170329_2,1
    liblz4: 1.8.0,1
    unixODBC: 2.3.4
    curl: 7.58.0
    libnghttp2: 1.29.0

Number of packages to be installed: 11

The process will require 434 MiB more space.
45 MiB to be downloaded.

Proceed with this action? [y/N]: n



Thanks for helping. Here is the output from running the same commands as you

Code:
$ sudo pkg install mysql-connector-c++                                                                                                                                            
Updating FreeBSD repository catalogue...                                                                                                                                         
FreeBSD repository is up to date.                                                                                                                                                 
All repositories are up to date.                                                                                                                                                 
Checking integrity... done (1 conflicting)                                                                                                                                       
  - mysql56-client-5.6.39 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/msql2mysql                                                                                   
Checking integrity... done (0 conflicting)                                                                                                                                       
The following 4 package(s) will be affected (of 0 checked):                                                                                                                       
                                                                                                                                                                                  
Installed packages to be REMOVED:                                                                                                                                                 
        mariadb102-client-10.2.13                                                                                                                                                 
        mariadb102-server-10.2.13                                                                                                                                                 
                                                                                                                                                                                  
New packages to be INSTALLED:                                                                                                                                                     
        mysql-connector-c++: 1.1.9_2                                                                                                                                             
        mysql56-client: 5.6.39                                                                                                                                                   
                                                                                                                                                                                  
Number of packages to be removed: 2                                                                                                                                               
Number of packages to be installed: 2                                                                                                                                             
                                                                                                                                                                                  
The operation will free 195 MiB.                                                                                                                                                 
                                                                                                                                                                                  
Proceed with this action? [y/N]:



Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client                                                                                                                          
Updating FreeBSD repository catalogue...                                                                                                                                         
FreeBSD repository is up to date.                                                                                                                                                 
All repositories are up to date.                                                                                                                                                 
Checking integrity... done (1 conflicting)                                                                                                                                       
  - mysql56-client-5.6.39 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/msql2mysql                                                                                   
Checking integrity... done (0 conflicting)
The following 4 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        mariadb102-client-10.2.13
        mariadb102-server-10.2.13

New packages to be INSTALLED:
        mysql-connector-c++: 1.1.9_2
        mysql56-client: 5.6.39

Number of packages to be removed: 2
Number of packages to be installed: 2

The operation will free 195 MiB.




Code:
$ sudo pkg install mysql-connector-c++ mariadb102-client mariadb102-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (1 conflicting)
  - mysql56-client-5.6.39 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/msql2mysql
Checking integrity... done (0 conflicting)
The following 4 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        mariadb102-client-10.2.13
        mariadb102-server-10.2.13

New packages to be INSTALLED:
        mysql-connector-c++: 1.1.9_2
        mysql56-client: 5.6.39

Number of packages to be removed: 2
Number of packages to be installed: 2

The operation will free 195 MiB.


Code:
sudo pkg install mysql-connector-c++ mariadb102-client mariadb102-server mariadb-connector-c
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (2 conflicting)
  - mariadb-connector-c-3.0.2_1 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/mariadb_config
  - mysql56-client-5.6.39 conflicts with mariadb102-client-10.2.13 on /usr/local/bin/msql2mysql
Checking integrity... done (0 conflicting)
The following 5 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        mariadb102-client-10.2.13
        mariadb102-server-10.2.13

New packages to be INSTALLED:
        mysql-connector-c++: 1.1.9_2
        mariadb-connector-c: 3.0.2_1
        mysql56-client: 5.6.39

Number of packages to be removed: 2
Number of packages to be installed: 3

The operation will free 194 MiB.
 
First it's important to determine how you're trying to install these. Are you using binary packages or are you using the ports collection? And if its the latter then what did you configure in /etc/make.conf?

Because by default the connector doesn't seem to rely on any specific database package:

Code:
$ make run-depends-list && make build-depends-list
/usr/ports/ftp/curl
/usr/ports/converters/libiconv
/usr/ports/ports-mgmt/pkg
/usr/ports/devel/cmake
/usr/ports/devel/ninja
/usr/ports/ftp/curl
/usr/ports/converters/libiconv
So either you have something specific configured in /etc/make.conf or you're trying to combine binary packages with ports, which is usually a bad idea due to dependency issues.



I am using the pkg for now.

I dont really have a preference on mariadb or mysql since from a dev standpoint they are the same. I dont care for how mysql got sold to oracle and will probably charge for it in the near future.
 
Well, if you don't care about which variant you use, then why did you mention in the OP that you specifically needed one? ;)

If you absolutely need the mysql-connector-c++, then you'll need to use the mysql client and server packages.

If you absolutely need mariadb, then you'll need to use the mariadb connector, client, and server.

And if you really want to mix and match them, you'll need to fiddle around with the ports tree, /etc/make.conf, and OPTIONS.

(After running through the commands a few more times on my test system, I am now getting the conflicts messages on the client packages. I didn't answer Y originally as I didn't want to actually install it, and pkg usually goes through all the conflicts before attempting to download the packages; not sure why it didn't this time.)

NOTE: if you go to the homepage for the mariadb-connector-c port, you'll notice that it supports access via C and C++ programs. IOW, you don't need the mysql-connector-c++ package at all. Just mariadb-connector-c, mariadb102-client, and mariadb102-server. If you had started your original post with "I need to install a database connector for C++ programs for accessing MariaDB", you could have saved a lot of gnashing of teeth and banging of heads. ;) :) :D

So, the MySQL variant:
Code:
# pkg install mysql-connector-c mysql-connector-c++ mysql-server mysql56-client mysql56-server

The MariaDB variant:
Code:
# pkg install mariadb-connector-c mariadb102-client mariadb102-server
 
Back
Top