[Flask] Connecting to 2 servers

Larry Martell larry.martell at gmail.com
Mon Aug 12 15:13:15 EDT 2019


On Mon, Aug 12, 2019 at 2:14 PM Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> On Mon, 12 Aug 2019 13:18:24 -0400, Larry Martell
> <larry.martell at gmail.com> declaimed the
> following:
>
> >
> >I changed it to use the 'pass-through-exact-pyodbc-string' but got the
> >same error. Then I thought maybe the driver is not installed. So I
> >followed the instructions here:
> >
> >https://medium.com/@liamfirth/installing-mssql-odbc-driver-17-1-0-1-on-amazon-web-services-linux-9a8febccfe94
> >
> >and installed it and changed my driver string to ODBC Driver 17 for
> >SQL Server and now I get:
> >
> >Can't open lib '/usr/local/lib/libmsodbcsql.17.dylib' : file not found
> >
> >but it is there:
> >
> ># ls -l /usr/local/lib/libmsodbcsql.17.dylib
> >-r--r--r-- 1 root root 2539360 Aug 12 17:06 /usr/local/lib/libmsodbcsql.17.dylib
>
>         We're past my level of expertise (in truth, Google was the source for
> everything in my previous post). Best I can come up with might be related
> to
>
> https://linux.die.net/man/8/ldconfig
>
> Does
>         ldconfig -p
> list the file?

No.

> If not... is /usr/local/lib somewhere in /etc/ld.so.conf (or
> any subfiles referenced)? The Debian on Windows seems to have it
> included...
>
> wulfraed at ElusiveUnicorn:~$ cat /etc/ld.so.conf
> include /etc/ld.so.conf.d/*.conf
>
> wulfraed at ElusiveUnicorn:~$ ls /etc/ld.so.conf.d/
> libc.conf  x86_64-linux-gnu.conf
> wulfraed at ElusiveUnicorn:~$ cat /etc/ld.so.conf.d/*.conf
> # libc default configuration
> /usr/local/lib
> # Multiarch support
> /lib/x86_64-linux-gnu
> /usr/lib/x86_64-linux-gnu
> wulfraed at ElusiveUnicorn:~$
>
>         Even with it (the directory) there, you may need to rebuild cache by
> running ldconfig

This is Amazon Linux

# ls /etc/ld.so.conf.d/

kernel-4.14.123-86.109.amzn1.x86_64.conf
kernel-4.14.133-88.105.amzn1.x86_64.conf
kernel-4.14.133-88.112.amzn1.x86_64.conf

# cat /etc/ld.so.conf.d/*
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 0 set in their hwcap match
# fields.  In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 0 set in their hwcap match
# fields.  In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 0 set in their hwcap match
# fields.  In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg

If I run ldconfig -v I can see it search in

/lib:
/lib64:
/usr/lib:
/usr/lib64:

I tried symlinking /usr/local/lib/libmsodbcsql.17.dylib to /usr/lib
but it still did not pick it up.


More information about the Flask mailing list