Skip to content
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

E: Unable to locate package msodbcsql17 #3024

Closed
utopictown opened this issue Jul 15, 2021 · 4 comments
Closed

E: Unable to locate package msodbcsql17 #3024

utopictown opened this issue Jul 15, 2021 · 4 comments

Comments

@utopictown
Copy link

utopictown commented Jul 15, 2021

Description:

i got error

E: Unable to locate package msodbcsql17

when building php-fpm

Expected Behavior:

image built successfully

Context information:

Output of git rev-parse HEAD

2bbe850d2889206b796034a56e04dd6951fd4da8

Output of docker version

Client:
 Cloud integration: 1.0.17
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.16.4
 Git commit:        f0df350
 Built:             Wed Jun  2 11:56:23 2021
 OS/Arch:           darwin/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:55:36 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker-compose version

docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.9.0
OpenSSL version: OpenSSL 1.1.1h  22 Sep 2020

System info: Mac, Windows or Linux. Include which disto/version

Macbook Pro m1 2020 
MacOS Big Sur 11.14

Steps to reproduce the issue:

  1. PHP_FPM_INSTALL_MSSQL=true
  2. docker-compose build --no-cache php-fpm

Stacktrace & Additional info:

executor failed running [/bin/sh -c set -eux;   if [ ${INSTALL_MSSQL} = true ]; then     if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then       apt-get -yqq install freetds-dev libsybdb5       && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so       && docker-php-ext-install mssql pdo_dblib       && php -m | grep -q 'mssql'       && php -m | grep -q 'pdo_dblib'     ;else       apt-get install -yqq apt-transport-https gnupg       && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -       && curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list       && apt-get update -yqq       && ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales       && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen       && ln -sfn /etc/locale.alias /usr/share/locale/locale.alias       && locale-gen       && if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "2" ]; then         pecl install pdo_sqlsrv-5.8.1 sqlsrv-5.8.1       ;elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then         pecl install pdo_sqlsrv-5.6.1 sqlsrv-5.6.1       ;elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then         pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0       ;else         pecl install pdo_sqlsrv sqlsrv       ;fi       && docker-php-ext-enable pdo_sqlsrv sqlsrv       && php -m | grep -q 'pdo_sqlsrv'       && php -m | grep -q 'sqlsrv'     ;fi   ;fi]: exit code: 100
ERROR: Service 'php-fpm' failed to build : Build failed
@ZorbaDimatteo
Copy link

Hi,
I'm experiencing a similar issue. Here the details:

when I run docker-compose up -d nginx mssql

I get this error:

#76 7.273 + ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc unixodbc-dev libgss3 odbcinst locales
#76 7.346 Reading package lists...
#76 8.123 Building dependency tree...
#76 8.289 Reading state information...
#76 8.373 locales is already the newest version (2.31-0ubuntu9.2).
#76 8.373 locales set to manually installed.
#76 8.373 Some packages could not be installed. This may mean that you have
#76 8.373 requested an impossible situation or if you are using the unstable
#76 8.373 distribution that some required packages have not yet been created
#76 8.373 or been moved out of Incoming.
#76 8.373 The following information may help to resolve the situation:
#76 8.373
#76 8.373 The following packages have unmet dependencies:
#76 8.463  odbcinst : Depends: odbcinst1debian2 (>= 2.3.7) but it is not going to be installed
#76 8.464  unixodbc : Depends: odbcinst1debian2 (>= 2.3.7) but it is not going to be installed
#76 8.464             Depends: libodbc1 (>= 2.3.7) but it is not going to be installed
#76 8.464  unixodbc-dev : Depends: odbcinst1debian2 (= 2.3.7) but it is not going to be installed
#76 8.479 E: Unable to correct problems, you have held broken packages.
------
executor failed running [/bin/sh -c set -eux;   if [ ${INSTALL_MSSQL} = true ]; then     if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then       apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5       && php -m | grep -q 'mssql'       && php -m | grep -q 'pdo_dblib'     ;else       curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - &&
      curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list &&       apt-get update -yqq &&       ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc unixodbc-dev libgss3 odbcinst locales &&       ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd &&       ln -sfn /opt/mssql-tools/bin/bcp /usr/bin/bcp &&
  echo "en_US.UTF-8 UTF-8" > /etc/locale.gen &&       locale-gen &&       if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then         pecl install sqlsrv-5.3.0 pdo_sqlsrv-5.3.0       ;else
         pecl install sqlsrv pdo_sqlsrv       ;fi &&       echo "extension=sqlsrv.so"     > /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-sqlsrv.ini &&       echo "extension=pdo_sqlsrv.so" > /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-pdo_sqlsrv.ini       && php -m | grep -q 'sqlsrv'       && php -m | grep -q 'pdo_sqlsrv'     ;fi   ;fi]: exit code: 100
ERROR: Service 'workspace' failed to build : Build failed

Docker version

Client:
 Cloud integration: 1.0.17
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.16.4
 Git commit:        f0df350
 Built:             Wed Jun  2 12:00:56 2021
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:54:58 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Docker compose version

docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.9.0
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020

System info

Windows 10 Pro

@bestlong bestlong added the PHP Extension: sqlsrv / dblib (MSSQL) Microsoft SQL Server Functions label Sep 8, 2021
@bestlong
Copy link
Member

bestlong commented Sep 8, 2021

ref: #3042

@stale
Copy link

stale bot commented Dec 9, 2021

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Dec 9, 2021
@stale
Copy link

stale bot commented Jan 3, 2022

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants