Error opening driver linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

pyodbc.Error: (‘01000’, «[01000] [unixODBC][Driver Manager]Can’t open lib ‘driver’ : file not found (0) (SQLDriverConnect)») #448

pyodbc.Error: (‘01000’, «[01000] [unixODBC][Driver Manager]Can’t open lib ‘driver’ : file not found (0) (SQLDriverConnect)») #448

Comments

Hi all,
I am trying to use a docker image built from https://github.com/Microsoft/mssql-docker/blob/master/oss-drivers/pyodbc/Dockerfile (and added python3) to connect to Azure SQL database.

import pyodbc driver = 'ODBC Driver 17 for SQL Server' server = 'sql_srv' database = 'mydb' uid = 'myadmin' pwd = 'mypass' con_string = r'DRIVER=;SERVER=;DATABASE=;UID=;PWD=' cnxn = pyodbc.connect(con_string) cursor = cnxn.cursor() print ('Using the following SQL Server version:') tsql = "SELECT @@version;" with cursor.execute(tsql): row = cursor.fetchone() print (str(row[0])) 

but I get the following error:

Traceback (most recent call last): File "/sample.py", line 22, in cnxn = pyodbc.connect(con_string) pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'driver' : file not found (0) (SQLDriverConnect)") 

Can anyone hint me please what is missing ?

The text was updated successfully, but these errors were encountered:

root@49299e8d95f7:/sample# odbcinst -j unixODBC 2.3.7 DRIVERS. /etc/odbcinst.ini SYSTEM DATA SOURCES: /etc/odbc.ini FILE DATA SOURCES. /etc/ODBCDataSources USER DATA SOURCES. /root/.odbc.ini SQLULEN Size. 8 SQLLEN Size. 8 SQLSETPOSIROW Size.: 8 root@49299e8d95f7:/sample# cat /etc/odbcinst.ini [ODBC Driver 13 for SQL Server] Description=Microsoft ODBC Driver 13 for SQL Server Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2 UsageCount=1 [ODBC Driver 17 for SQL Server] Description=Microsoft ODBC Driver 17 for SQL Server Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1 UsageCount=1 root@49299e8d95f7:/sample# cat /etc/odbc.ini root@49299e8d95f7:/sample# ls -al /etc/ODBCDataSources/ total 8 drwxrwxr-x 2 root root 4096 Dec 5 23:17 . drwxr-xr-x 1 root root 4096 Apr 23 21:18 .. 

@przemolb having same issue here, did you solve it?

drivers = [item for item in pyodbc.drivers()] driver = drivers[-1] print("driver:<>".format(driver)) server = 'myserver' database = 'mydb' uid = 'myuser' pwd = 'mypass' con_string = f'DRIVER=;SERVER=;DATABASE=;UID=;PWD=' print(con_string) cnxn = pyodbc.connect(con_string) . 

Источник

Читайте также:  Линукс поддержка сенсорного экрана

Error opening device /dev/sysdig0: make sure sysdig-probe module is loaded [closed]

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

I’m running Linux 4.16.8-1-MANJARO #1 SMP PREEMPT x86_64 GNU/Linux . I’ve installed the sysdig package, and trying to run it, I see:

$ sudo sysdig Unable to load the driver error opening device /dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded. 

@GAD3R I get a message saying precompiled module https://s3.amazonaws.com/download.draios.com/stable/sysdig-probe-binaries/sysdig-probe-0.21.0-x86_64-4.16.8-1-MANJARO-c16b3360877c0c3271d78341a59b8f74.ko can’t be downloaded. The link is to an XML file saying «access deined’

1 Answer 1

I needed to install the kernel headers:

sudo pacman -S linux416-headers 

As part of this process, the sysdig module was installed:

:: Running post-transaction hooks. (1/3) Updating linux416 module dependencies. (2/3) Install DKMS modules ==> dkms install sysdig/0.21.0 -k 4.16.8-1-MANJARO 

Hot Network Questions

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.14.43533

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Wodim can’t open SCSI driver in Debian Jessie?

I’m attempting to write an ISO image to a CD on Debian Jessie. I have the CD in the drive, and it appears that all of the symbolic links are pointing where they should be, and the kernel recognized my CD-RW drive. (Which is connected via IDE by the way) I installed Wodim from the official Debian repository. With either wodim —devices or wodim -scanbus I receive.

wodim: No such file or directory. Cannot open SCSI driver! For possible targets try 'wodim --devices' or 'wodim -scanbus'. For possible transport specifiers try 'wodim dev=help'. For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from the wodim documentation. 

Although I don’t think it should make a difference, I’m doing this via remote SSH. The error says specifically that I need to read README.ATAPI.setup . I would be more than happy to do that if I had any idea where that was. I did a Google search for that file, but only found questions on various forums about issues similar to mine. After finding this question I ran some test commands to see if I had the same problem. lsmod | grep sr_mod yields.

sr_mod 21568 0 cdrom 46828 1 sr_mod scsi_mod 164132 4 sg,libata,sd_mod,sr_mod 
sg 25573 0 scsi_mod 164132 4 sg,libata,sd_mod,sr_mod 
brw-rw---- 1 root cdrom 11, 0 Mar 12 17:20 /dev/sr0 
lrwxrwxrwx 1 root root 3 Mar 12 17:20 /dev/cdrom -> sr0 

Running any of these commands as root with sudo , or with a root shell do not affect the outcomes of any of these commands. Furthermore telling Wodim what device to use with wodim dev=/dev/sr0 —scanbus yields the same results as not declaring the shell variable. What’s the issue?

Читайте также:  Drivers nvidia 1060 linux

/home/ethan# wodim dev=/dev/sr0 -checkdrive Device type : Removable CD-ROM Version : 5 Response Format: 2 Capabilities : Vendor_info : ‘HL-DT-ST’ Identification : ‘DVD-RAM GH40L ‘ Revision : ‘RB02’ Device seems to be: Generic mmc2 DVD-R/DVD-RW. Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr). Driver flags : MMC-3 SWABAUDIO BURNFREE Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R

2 Answers 2

That error message produced by wodim usually means that you have a disc in your CD-RW drive and the disc is mounted. Unmount the disc and try running wodim -scanbus again. Wodim displays «No such file or directory» for the following reason. Wodim’s -scanbus option works by opening every file that could possibly point to a CD/DVD writer and querying each device to determine if any of the devices are CD/DVD writers. Now, the way wodim works, if it finds no devices, it fails, displaying the error message corresponding to the last error it encountered. On my system, the last device wodim encounters is /dev/scd255 , which probably does not exist on your system, so wodim displays the error message corresponding to the last error it encountered, which is «No such file or directory». If you want to see all the error messages as wodim checks every device, you can execute strace wodim -scanbus . On my system with a mounted disc in the drive, it produces:

[many irrelevant and repetitive lines of output deleted] ︙ open("/dev/hdy", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/dev/hdz", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT (No such file or directory) uname() = 0 open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 EBUSY (Device or resource busy) nanosleep(, NULL) = 0 open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 EBUSY (Device or resource busy) nanosleep(, NULL) = 0 open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 EBUSY (Device or resource busy) nanosleep(, NULL) = 0 open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 EBUSY (Device or resource busy) nanosleep(, NULL) = 0 open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 EBUSY (Device or resource busy) nanosleep(, NULL) = 0 open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 EBUSY (Device or resource busy) open("/dev/scd1", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/dev/scd2", O_RDWR|O_EXCL|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT (No such file or directory) ︙ [many more irrelevant and repetitive lines of output deleted] 

As you will see in the above output, wodim detects a optical drive, but cannot open it exclusively for itself. By the way, on my system, /dev/scd0 is a symbolic link to /dev/sr0 :

$ ls -l /dev/scd0 lrwxrwxrwx 1 root root 3 2019-04-03 11:13 /dev/scd0 -> sr0 

As for that file called README.ATAPI.setup , on Debian and its derivatives, the file is located in the directory /usr/share/doc/wodim , and it can be found online here and possibly other places. Its contents are out of date, and some of the information is misleading. For example, the document states:

If you have just one CD writer in your computer, CD-writing should work out of the box. There should be a symbolic link /dev/cdrw which points to your actual CD-Writer’s device (e.g., /dev/hdb ). If the link is not present (e.g., the system is not using udev/devfs) or if you want to use a different device as default, you can configure the device in /etc/wodim.conf :

would configure the default device to be /dev/hdd , i.e., the slave device on the secondary IDE bus.

Читайте также:  Linux create desktop file

The advice on using /dev/hdb or /dev/hdd does not apply anymore, since the Linux kernel now uses «IDE-SCSI» emulation to make IDE / PATA devices appear as SCSI devices. Thus, you can read the document, but wherever there is a /dev/hd* , replace it with a /dev/sr0 .

Источник

Оцените статью
Adblock
detector