Skip to content

Commit 7ec0e7d

Browse files
authored
DOC: README - Kerberos Dependencies on Linux (#211)
### Work Item / Issue Reference <!-- IMPORTANT: Please follow the PR template guidelines below. For mssql-python maintainers: Insert your ADO Work Item ID below (e.g. AB#37452) For external contributors: Insert Github Issue number below (e.g. #149) Only one reference is required - either GitHub issue OR ADO Work Item. --> <!-- mssql-python maintainers: ADO Work Item --> > AB#<WORK_ITEM_ID> <!-- External contributors: GitHub Issue --> > GitHub Issue: #204 ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> This pull request updates installation instructions and error messaging to improve the setup experience for Linux users. The most important changes include expanding the list of required packages in the documentation for various Linux distributions and clarifying error messages to direct users to the documentation for troubleshooting. **Documentation improvements:** * Expanded the list of required system packages in the `README.md` for Alpine, Debian/Ubuntu, RHEL/CentOS/Fedora, and added instructions for SUSE/openSUSE to ensure all necessary dependencies are installed before running `pip install mssql-python`. **Error handling improvements:** * Updated the error message in `ddbc_bindings.cpp` to direct Linux users to the documentation for dependency installation, instead of referencing only the `libltdl7` package. <!-- ### PR Title Guide > For feature requests FEAT: (short-description) > For non-feature requests like test case updates, config updates , dependency updates etc CHORE: (short-description) > For Fix requests FIX: (short-description) > For doc update requests DOC: (short-description) > For Formatting, indentation, or styling update STYLE: (short-description) > For Refactor, without any feature changes REFACTOR: (short-description) > For release related changes, without any feature changes RELEASE: #<RELEASE_VERSION> (short-description) ### Contribution Guidelines External contributors: - Create a GitHub issue first: https://github.com/microsoft/mssql-python/issues/new - Link the GitHub issue in the "GitHub Issue" section above - Follow the PR title format and provide a meaningful summary mssql-python maintainers: - Create an ADO Work Item following internal processes - Link the ADO Work Item in the "ADO Work Item" section above - Follow the PR title format and provide a meaningful summary -->
1 parent d185d52 commit 7ec0e7d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ pip install mssql-python
2424
**Linux:** mssql-python can be installed with [pip](http://pypi.python.org/pypi/pip)
2525
```bash
2626
# For Alpine
27-
apk add libtool krb5-libs
27+
apk add libtool krb5-libs krb5-dev
2828

29-
# For Debian/Ubuntu
30-
apt-get install -y libltdl7
29+
# For Debian/Ubuntu
30+
apt-get install -y libltdl7 libkrb5-3 libgssapi-krb5-2
3131

3232
# For RHEL
33-
dnf install -y libtool-ltdl
33+
dnf install -y libtool-ltdl krb5-libs
34+
35+
# For SUSE
36+
zypper install -y libltdl7 libkrb5-3 libgssapi-krb5-2
3437

3538
pip install mssql-python
3639
```

mssql_python/pybind/ddbc_bindings.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -725,11 +725,7 @@ DriverHandle LoadDriverOrThrowException() {
725725
DriverHandle handle = LoadDriverLibrary(driverPath.string());
726726
if (!handle) {
727727
LOG("Failed to load driver: {}", GetLastErrorMessage());
728-
// If this happens in linux, suggest installing libltdl7
729-
#ifdef __linux__
730-
ThrowStdException("Failed to load ODBC driver. If you are on Linux, please install libltdl7 package.");
731-
#endif
732-
ThrowStdException("Failed to load ODBC driver. Please check installation.");
728+
ThrowStdException("Failed to load the driver. Please read the documentation (https://github.com/microsoft/mssql-python#installation) to install the required dependencies.");
733729
}
734730
LOG("Driver library successfully loaded.");
735731

0 commit comments

Comments
 (0)