Score:0

Error while loading shared libraries: libodbc.so.2:

tr flag

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.

cn flag
Ray
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.
SabZero avatar
tr flag
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.`
cn flag
Ray
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.
N0rbert avatar
zw flag
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)
SabZero avatar
tr flag
Thanks guys I solved the problem by removing the MSSQL server and downloading it again
SabZero avatar
tr flag
@N0rbert thank you ıts the solve to malformed error
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.