-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unixodbc packages conflict with upstream packages on Ubuntu 22.04 and Debian 11 #39
Comments
I'm having the same problem running CI on the GitHub action runner ( Ubuntu 22.04.1). The details of the error are as follows:
Anyone know of a solution? |
Looks like this has been raised in https://bugs.launchpad.net/ubuntu/+source/unixodbc/+bug/2006998 and https://bugs.launchpad.net/ubuntu/+source/unixodbc/+bug/2007288 (the second one includes a hack fix) |
Having the same problem here today with with
MS seems to ship a newer |
Hi everyone, this problem persist in Ubuntu alternatives Distro (Pop OS, Zorin and Linux Mint). This problem broken command apt dist-upgrade and Erlang Kerl Compile (Unixodbc is necessary to Erlang Kerl native or ASDF). This temporary solution for me: sudo dpkg --remove unixodbc sudo dpkg --remove unixodbc-dev I Have install erlang with snap and vscode is snap temporally until the correction. I'm commenting on this issue to keep track of possible solutions. |
The only feasible long term solution is for MS to fix their repo. |
Facing the same issue with out of the blue in our GIthub action runner today:
|
@rajpawar02 Fixed my CIs by installing the odbc stuff before adding the MS repositories according to this input https://bugs.launchpad.net/ubuntu/+source/unixodbc/+bug/2007288/comments/3 |
I tried the suggested workaround in the linked bug but it did not work for me - Commit - manitgupta/spanner-migration-tool@e30062a |
EDIT: for a more complete example, jump ahead to #39 (comment) For desktop users that don't want/need the Microsoft version of unixodbc, you can add the following to
|
Even though no one from MS wrote something here, the package seems to habe been removed from the repository again and therefore this issue should no longer exist. |
I confirm, the issue seems to be solved. |
I execute dist-upgrade in my Ubuntu 22.04 is not having issue in Microsoft repository. Installation proceed normaly in Unixodbc and Unixodbc-dev. |
Yes, solved now. |
running this again this morning, I'm still seeing
pinning |
@falkben This was so far about the Ubuntu 22 repo. It seems that the Debian 11 repo is also and still affected (while Ubuntu is fixed). |
I understand that I am still having this issue on Ubuntu 20.04. It looks like the packages have not been removed from the packages files as I can still see them (e.g. libodbc) here: https://packages.microsoft.com/ubuntu/20.04/prod/dists/focal/main/) |
It is still failing for me. Anyone else still could not resolve the issue? |
This should be addressed now. The unixodbc 2.3.11 packages were removed for Ubuntu 22.04 and higher. Use the unixodbc packages provided by Ubuntu. For Debian 10, 11, and Ubuntu 20.04, 18.04, an updated package, 2.3.11-1, was published with a fix for the header issue. |
@David-Engel It is still failing for me. I am building a docker image and fails in one of these steps:
I get these errors: Anything you think I should change? |
removing these packages is a pain you don't want to feel
then you need to edit postrm script of msodbcsql17 using root comment the two lines in postrm that start with odbcinst and db_purge in the remove section and save
Then follow this tutorial for 22.04 ubuntu desktop |
Update package dependencies Upgrade to Laravel 9 The installers update includes several changes: - Support of Fedora v34, v35 and Ubuntu v18 has been discontinued. - Add support for Fedora v37 and Ubuntu v22. - Upgrade dependencies to PHP 8.1. There is an issue with the include in the latest version of unixodbc-dev v2.3.11. As a temporary solution, we have reverted to a previous version that does not have this problem. For more information, please refer to the related issues: - microsoft/linux-package-repositories#36 - microsoft/linux-package-repositories#39
Update package dependencies Upgrade to Laravel 9 The installers update includes several changes: - Support of Fedora v34, v35 and Ubuntu v18 has been discontinued. - Add support for Fedora v37 and Ubuntu v22. - Upgrade dependencies to PHP 8.1. There is an issue with the include in the latest version of unixodbc-dev v2.3.11. As a temporary solution, we have reverted to a previous version that does not have this problem. For more information, please refer to the related issues: - microsoft/linux-package-repositories#36 - microsoft/linux-package-repositories#39
Is there still a problem here or can I close this issue? I've tested things out in Debian 11 and Ubuntu 18.04 and it seems to work currently. If something is still broken we need a more clear reproducer. From an arbitrary machine with docker (or similar) installed:
|
It's been a few weeks since any chatter, so I'll go ahead and close it and see if anyone objects. |
The problem is still there. |
Until today, the problem is still here but this is the way I solved the issue using a Debian image: FROM php:8.2.1-apache-bullseye as production
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
wget \
curl \
; \
curl -SL --progress-bar https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
curl -SL --progress-bar https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list; \
apt-get update; \
ACCEPT_EULA=Y apt-get install -y msodbcsql18; \
apt-get install -y unixodbc-dev; \
sed -i -E 's/(CipherString\s*=\s*DEFAULT@SECLEVEL=)2/\11/' /etc/ssl/openssl.cnf; \
rm -rf /var/lib/apt/lists/*;
RUN set -eux; \
pecl install \
sqlsrv \
pdo_sqlsrv \
; \
docker-php-ext-enable \
sqlsrv \
pdo_sqlsrv \
; \
echo "extension= pdo_sqlsrv.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; \
echo "extension= sqlsrv.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; |
It might be worth noting that this breaks upgrades from bullseye to bookworm if anything else depends on the library. |
> @pborquez |
This got me past the problem on a Debian 11 to 12 (bullseye to bookworm) dist-upgrade: |
I can confirm that I still have to use the ubuntu repository for my debian 11 docker container to install the PHP sqlsrv extension.
If I switch to https://packages.microsoft.com/config/debian/11/prod.list the build will fail. |
Yes, this still fails when using debian. I have to include the following line in my script: apt-get install -y --allow-downgrades unixodbc-dev=2.3.7 unixodbc=2.3.7 odbcinst1debian2=2.3.7 odbcinst=2.3.7 |
Why is this issue closed? It is still broken with Ubuntu 22.04. |
Because devs do not care. This is a widespread issue and it's causing a pletora of problems... but devs do not care to fix the conflicts. |
They did say they need a clear way to reproduce the issue. Could someone create that? |
It's in the initial report, it works only when unixodbc ver 2.3.6 is already installed and, as you know, 2.3.6 is outdated and buggy. |
Okay, I can now reproduce the issue. Building this Dockerfile for example fails:
This appears to be a duplicate of this issue, where they note not only the "use the Ubuntu repo" workaround but also a "use an older version of unixodbc" workaround:
The root cause appears to be (and here I'm only reading the comments in that issue) that these packages were built from a broken version of upstream I recommend everyone move this discussion to that issue, since it's actually filed against the team that can help here. I'll also ping them internally with the reproducer and explanation. |
I found the following code snippet from Microsoft page to Install the Microsoft ODBC driver for SQL Server (Linux), and it works perfectly fine-
|
You should know that adding a key to /etc/apt/trusted.gpg.d is insecure:
|
Hey @mbomb007 thanks for letting me know, I wasn't aware of that. So what do you suggest I should do in order to get around this issue? Actually I found another solution that works perfectly fine too, turned out I just needed to install unixodbc-dev before the rest-
|
@SirArthur7 the recommended path is to use the |
The new file format for apt sources is known as
And the keyring was obtained with sudo curl -LsSo /etc/apt/keyrings/mariadb-keyring-2019.gpg https://supplychain.mariadb.com/mariadb-keyring-2019.gpg I manually converted the default-style file that was created when using the setup script into the new DEB822 format. |
Describe the issue
I'm getting errors from apt about
unixodbc
packages.When did the issue occur?
14 Febuary, 2023
If applicable, what package did you attempt to install, and from which repo?
Just doing automatic apt update.
libodbc2
is used by many packages (unrelated to Microsoft). I havehttp://packages.microsoft.com/
in my apt sources for VS Code.Steps to Reproduce
libodbc2
, for exampleblender
.http://packages.microsoft.com/
Actual Result
Apt fails because of conflicts. The Microsoft version of the package is shipping the v2 library in a
libodbc1
package instead of alibodbc2
package. Apt tries to install both at the same time and it can't because both packages try to install the same file.Expected Result
Microsoft should not be shipping updates to upstream packages in a general package archive like this. Or at minimum, it should be opt-in rather than opt out.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: