Influxdb-client could not installed after influxdb was installed on RaspberryPi

I’m using a RaspberryPi with Python and InfluxDB. It worked well with the previous OS of PI. After upgrading to BOOKWORM I installed all Python libraries with “sudo apt install …” Unfortunately when installing influxdb-client I get the following error and don’t know how to solve. I saw similar threads, but none of the solutions worked for me.

sudo apt install influxdb-client
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following NEW packages will be installed:
influxdb-client
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/2,034 kB of archives.
After this operation, 6,828 kB of additional disk space will be used.
(Reading database … 159880 files and directories currently installed.)
Preparing to unpack …/influxdb-client_1.6.7~rc0-1+b13_arm64.deb …
Unpacking influxdb-client (1.6.7~rc0-1+b13) …
dpkg: error processing archive /var/cache/apt/archives/influxdb-client_1.6.7~rc0
-1+b13_arm64.deb (–unpack):
trying to overwrite ‘/usr/bin/influx’, which is also in package influxdb 1.8.10
-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/influxdb-client_1.6.7~rc0-1+b13_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hmmm that seems like influxdb-client package and the influxdb package already installed on your system and both packages are trying to place a binary (/usr/bin/influx) in the same location

I’d try removing the conflicting package and then reinstalling the client. If you still need the 1.x server you could rename the old binary. and then install the client again.

I’ve already tried to rename the file. Unfortunately the package manager still identify a conflict. I guess the manager does not rely on the realy files instead on a file list assigned with each package. Can I upgrade to 2.x server without any problem? Will this solve my problem?

I’ve update to V2.0 but this does not solve the conflict. I had to move to a virtual environment in Phython to get rid of the error message and install the influx client