-1

Hi i am trying to run sqlcmd in linux by this

sqlcmd -S localhost -U SA -P '123'

and i get this error

sqlcmd: error while loading shared libraries: libodbc.so.2: cannot open shared object file: No such file or directory

how can i solve this problem - Linux ( Ubuntu 20.04)

I tryed to install unixodbc-dev like this sudo apt-get install -y unixodbc-dev and i get this error E: Malformed entry 1 in list file /etc/apt/sources.list.d/mssql-release.list (Component) E: The list of sources could not be read.

karel
  • 110,292
  • 102
  • 269
  • 299
SabZero
  • 1
  • 1
  • 3
  • If you install the program `apt-file` and update it according to the instructions, you can then type `sudo apt-file search libodbc.so` to find the package that has the file you are looking for. Then, you can just install it. – Ray Sep 16 '21 at 13:04
  • thank you for response i tryed to install it bu i get this `E: Malformed entry 1 in list file /etc/apt/sources.list.d/mssql-release.list (Component) E: The list of sources could not be read.` – SabZero Sep 16 '21 at 13:22
  • I am not sure. I misread your question and thought you were using `mysql`, but it seems like you're using Microsoft's SQL and I don't know much about that. I guess the file `mssql-release.list` is a list of places where you got `mssql` from and, as the error indicates, that file is "malformed". It isn't formatted correctly. You can move that file to another place and then try again. Once you get past that, move it back. But this file has an issue, so you probably need to go back to how it was generated and see what's wrong there. – Ray Sep 16 '21 at 13:31
  • 1
    Does this answer your question? [How do I remove a malformed line from my sources.list?](https://askubuntu.com/questions/78951/how-do-i-remove-a-malformed-line-from-my-sources-list) – N0rbert Sep 16 '21 at 18:27
  • Thanks guys I solved the problem by removing the MSSQL server and downloading it again – SabZero Sep 17 '21 at 09:51
  • @N0rbert thank you ıts the solve to malformed error – SabZero Sep 17 '21 at 09:52

0 Answers0