I am trying to install ms sql in Ubuntu 20.04. Even I have got it installed in 20.04 successfully following this guide but I sometime I have this problem multiple time and not sure why is this happening.
When I try to run following commads
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get install mssql-tools unixodbc-dev
I end up having below errors:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going to be installed
unixodbc-dev : Depends: unixodbc (= 2.3.7)
Depends: odbcinst1debian2 (= 2.3.7) but 2.3.6-0.1build1 is to be inst
E: Unable to correct problems, you have held broken packages.
sudo apt-cache policy <package> shows multiple versions available for these packages.
I tried installing the right versions for dependencies that did not help when I ran sudo apt-get install mssql-tools unixodbc-dev again.
When I checked msprod.list file, it looks like 'https://packages.microsoft.com/config/ubuntu/18.04/prod' the tailed .list is missing so I added that(not sure I should do that or not). Then I have got everything installed.
Now when I do sudo apt update it ends up with below error:
E: The repository 'https://packages.microsoft.com/ubuntu/18.04/prod.list bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I really don't understand what is happening and what I have to do to get thing working in simplest way.
Do as follow:
apt install mssql-tools unixodbc-dev odbcinst1debian2 msodbcsql17 unixodbc libodbc1
apt-get install stuff caring about package conflict.
If you use apt only it will forcefully install the package without taking care if the installation is creating conflicts.
Related
I tried to install MongoDB on the ubuntu 20.04 and the used command are given below,
To create a mongodb-org-4.4.list file in the sources.list.d folder
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Updated the system,
sudo apt-get update
Install the MongoDB on my system,
sudo apt install mongodb-org
After running the above command I just faced an error and it was not install in ubuntu system and the error is given below, please concern who wanna to help me,
Reading package lists... Done
Building dependency tree
Reading state information... Done
mongodb-org is already the newest version (4.4.5).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Note: The error are also added in attached file.
Try like this
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
#Alex Blex, Please concern here,
>echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
>sudo apt-get update
>sudo apt install mongodb-org
After running the above command I also run apt --fix-broken install this command and it showed an error that is,
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Then I created an new director in my laptop as /var/lib/dpkg/lock-frontend But it's not solved.
Even I also run sudo apt-get --purge remove mongodb-org this command after your suggest and then run all the command again but it's again showed same problems.
And after running sudo apt-get --purge remove mongodb-org this command it showed below feedback, please concern here,
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Thanks, Everyone!
try this command :
sudo apt-get install -y mongodb-org
I use it to install MongoDB and it's working :
tuto : https://addi-kamal.medium.com/mongodb-iceberg-how-to-install-mongodb-on-ubuntu-server-9c5beea2c62
I have tried to install SQL Server command-line tools, but I get the next error
sql-tools unixodbc-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
mssql-tools is already the newest version (17.6.1.1-1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going to be installed
unixodbc-dev : Depends: unixodbc (= 2.3.7)
Depends: odbcinst1debian2 (= 2.3.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I tried using sudo apt install msodbcsql17 and sudo apt-get install unixodbc but get the similar errors with the second command.
Based on the version numbers in your question it appears that you ran the following curl command from the Microsoft's Install tools on Ubuntu 16.04 documentation:
$ curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 79 100 79 0 0 163 0 --:--:-- --:--:-- --:--:-- 163
deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main
If you do that on Ubuntu 20.04 then the apt-get install will fail with:
$ sudo apt-get install -y mssql-tools unixodbc-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going to be installed
unixodbc-dev : Depends: unixodbc (= 2.3.7) but it is not going to be installed
Depends: odbcinst1debian2 (= 2.3.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
As per the documentation you need to change the version number in the repository URL to match your Ubuntu version, so use the following curl command on Ubuntu 18.04:
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
And the following curl command on Ubuntu 20.04:
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
After downloading the correct repository reference and performing an apt-get update the apt-get install command should complete successfully.
I want to install texstudio in terminal by using this command: 'sudo apt-get install texstudio'
but get this error:
'The following packages have unmet dependencies: texstudio : Depends:
libpoppler-qt5-1 (>= 0.34.0) but it is not installable
Recommends: latex-beamer but it is not installable E: Unable to correct problems, you have held broken packages.'
I change the default settings of softwares & updates in ubuntu which looks like this:
is there anyway to fixed it? thanks.
You can try doing
sudo apt-get install -f
and then trying again
I'm rebuilding after a crash & subsequent upgrade to Ubuntu 18.04 LTS. Everything seems to be back to normal except for Python's pkg manager.
Below is launched by:
$sudo apt update
$sudo apt install python3-pip
The logs at first say that python3-pip is already installed:
python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1).
Then the installation apparently bombs as shown:
dpkg: error processing package libclojure-java (--configure):
dpkg: dependency problems prevent configuration of librobert-hooke-clojure:
dpkg: error processing package librobert-hooke-clojure (--configure):
Also at the bottom of the error message:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I understand dpkg is the Debian pkg manager but I am unsure of the best next step.
do you try to missing package by this command
sudo apt-get install -f
and then for update missing try
sudo apt-get update --fix-missing
and for upgrade missing package
sudo apt-get upgrade --fix-missing
I am not able to install apache2 on Ubuntu 14.04.
On executing
sudo apt-get install apache2 getting the below error:-
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.7-1ubuntu4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
As mentioned in the link I tried doing apt-get upgrade -f.
Also the output of dpkg --get-selections | grep -i ^apache2
apache2 deinstall
apache2-doc install
apache2-utils install
apache2.2-common deinstall
Output of apt-mark unhold apache2-bin
apache2-bin was already not hold
Output of apt-cache depends apache2
apache2
Depends: lsb-base
Depends: procps
procps:i386
Depends: perl
Depends: mime-support
Depends: apache2-bin
Depends: apache2-data
Suggests: <www-browser>
arora
dillo
dwb
lynx-cur:i386
lynx-cur
netsurf
netsurf-fb
netsurf-gtk
uzbl
chimera2
chromium-browser
elinks
epiphany-browser
firefox
google-chrome-beta
google-chrome-stable
google-chrome-unstable
konqueror
links
links2
midori
netrik
rekonq
surf
w3m:i386
w3m
xemacs21-mule
xemacs21-mule-canna-wnn
xemacs21-nomule
Suggests: apache2-doc
|Suggests: apache2-suexec-pristine
Suggests: apache2-suexec-custom
Suggests: ufw
Suggests: apache2-utils
apache2-utils:i386
Recommends: ssl-cert
Conflicts: apache2.2-common
Conflicts: <apache2.2-common:i386>
Replaces: apache2.2-common
Replaces: <apache2.2-common:i386>
Conflicts: apache2:i386
Output of apt-cache policy apache2 apache2-bin
apache2:
Installed: (none)
Candidate: 2.4.7-1ubuntu4
Version table:
2.4.16-4+deb.sury.org~precise+4 0
100 /var/lib/dpkg/status
2.4.7-1ubuntu4 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
apache2-bin:
Installed: (none)
Candidate: 2.4.7-1ubuntu4
Version table:
2.4.7-1ubuntu4 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
Output of sudo aptitude -f install apache2
The following NEW packages will be installed:
apache2 apache2-bin{a} apache2-data{a} libaprutil1-dbd-sqlite3{ab} libaprutil1-ldap{ab}
0 packages upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,106 kB of archives. After unpacking 4,703 kB will be used.
The following packages have unmet dependencies:
libaprutil1-dbd-sqlite3 : Depends: libaprutil1 (= 1.5.3-1) but 1.5.4-1+deb.sury.org~precise+1 is installed.
libaprutil1-ldap : Depends: libaprutil1 (= 1.5.3-1) but 1.5.4-1+deb.sury.org~precise+1 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) apache2 [Not Installed]
2) apache2-bin [Not Installed]
3) libaprutil1-dbd-sqlite3 [Not Installed]
4) libaprutil1-ldap [Not Installed]
Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Can some one help what is going wrong?
I face the similar problem when upgrading Ubuntu 12.04.x to 14.04.x with custom PPA that used to upgrade PHP5 previously.
I trace into the problem and found the package that having problem which is libaprutil1.
I try the following and it fixes my issue
apt-get remove libaprutil1
apt-get autoremove
apt-get install apache2
Hope it helps !
I had the same problem and I solved it with this commands
sudo apt-get -f autoremove
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
than try again :
sudo apt-get install apache2
Hey i had the same problem about months ago!
Try this:
apt-get --purge remove apache2
apt-get autoremove
rm -rf /etc/apache2/
apt-get clean
apt-get update
After that you can try to install it again.
I hope this helps :-)
When asked, don't accept the given solution so that aptitude, next, offer an alternative where it will install apache-bin which is the unmet dependency as the error shows.
I have recently solved this issue.
----------------issue-----------------------
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.7-1ubuntu4) but 2.4.29-1ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
-------------------------------------------------------------------
First, remove the apache2-bin from the ubuntu as
sudo apt-get --purge remove apache2-bin
now install apache-bin2
sudo apt install apache2
It can happen when your system has dependencies with different versions than the required.
In my case, i removed the dependencies and then installed.
sudo apt-get purge apache2-bin
and then:
sudo apt-get install apache2