I have been trying to install microsoft SQL server on my lInux machine but it keeps throwing the same error, even after following the instructions given here on this platform.
When I run:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
It throws this error:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 103, in __init__
self.sourceslist = SourcesList()
File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 276, in __init__
self.refresh()
File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 292, in refresh
self.matcher.match(source)
File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 484, in match
if (re.search(template.match_uri, source.uri) and
File "/usr/lib/python3.9/re.py", line 201, in search
return _compile(pattern, flags).search(string)
File "/usr/lib/python3.9/re.py", line 304, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.9/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.9/sre_parse.py", line 948, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub
itemsappend(_parse(source, state, verbose, nested 1,
File "/usr/lib/python3.9/sre_parse.py", line 834, in _parse
p = _parse_sub(source, state, sub_verbose, nested 1)
File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub
itemsappend(_parse(source, state, verbose, nested 1,
File "/usr/lib/python3.9/sre_parse.py", line 834, in _parse
p = _parse_sub(source, state, sub_verbose, nested 1)
File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub
itemsappend(_parse(source, state, verbose, nested 1,
File "/usr/lib/python3.9/sre_parse.py", line 668, in _parse
raise source.error("nothing to repeat",
re.error: nothing to repeat at position 2
and when I run:
sudo apt install mssql-server
It throws the following error:
The following packages have unmet dependencies:
mssql-server : Depends: libssl1.0.0 but it is not installable
E: Unable to correct problems, you have held broken packages.
I am unable to install libssl1.0.0 since its already in its latest version, libssl1.1
What do I do??
The output for cat /etc/debian_version
is parrot
And output of cat /etc/os-release
is
PRETTY_NAME="Parrot OS 5.0 (Electro Ara)"
NAME="Parrot OS"
VERSION_ID="5.0"
VERSION="5.0 (Electro Ara)"
VERSION_CODENAME=ara
ID=parrot
ID_LIKE=debian
HOME_URL="https://www.parrotsec.org/"
SUPPORT_URL="https://community.parrotsec.org/"
BUG_REPORT_URL="https://community.parrotsec.org/"
CodePudding user response:
ParrotOS is a Linux distribution based on Debian with a focus on security, privacy and development. You might want to check your reasons for installing SQL Server on it, perhaps you might wish to use a different distro.
The following shows how you can install Microsoft SQL Server 2019 on a ParrotOS 5.0 (ara) Docker container...
./docker-compose.yml
:
version: "3.8"
services:
parrot:
build: parrot
container_name: parrot
environment:
- "ACCEPT_EULA=Y"
- "SA_PASSWORD=StrongPassw0rd"
ports:
- "1433:1433"
./parrot/Dockerfile
:
# REFs:
# 1. Parrot on Docker
# https://parrotsec.org/docs/parrot-on-docker.html
# 2. SQL Server on Linux
# https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-overview
# 3. Quickstart: Install SQL Server and create a database on Ubuntu
# https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu
FROM parrotsec/core:5.0.0
RUN apt-get update
RUN apt-get install --yes wget
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list > /etc/apt/sources.list.d/mssql-server-2019.list
RUN apt-get update
RUN apt-get install --yes mssql-server
USER mssql
EXPOSE 1433
ENTRYPOINT [ "/opt/mssql/bin/sqlservr" ]
After running docker-compose up --build
you can connect to the running container (in this case, from the Docker host computer) to execute SQL queries...
$ sqlcmd -S localhost,1433 -U sa -P StrongPassw0rd
1> SELECT GETDATE()
2> GO
-----------------------
2022-05-28 11:36:37.783
(1 rows affected)