How to resolve this error while installing VSCode in Kali Linux? - visual-studio-code

I get this error code while installing.
I have tried using
sudo apt intall ./<filename>.deb
but it gives this error
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:
code : Depends: libgconf-2-4 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And also this:
sudo dpkg -i code_1.30.2-1546901646_amd64.deb
But it gives another error.
Selecting previously unselected package code.
(Reading database ... 340375 files and directories currently installed.)
Preparing to unpack code_1.30.2-1546901646_amd64.deb ...
Unpacking code (1.30.2-1546901646) ...
dpkg: dependency problems prevent configuration of code:
code depends on libgconf-2-4; however:
Package libgconf-2-4 is not installed.
dpkg: error processing package code (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.61) ...
Errors were encountered while processing:
code
Even sudo apt --fix-broken install doesn't help.

You need to install libgconf as the error states. You can find a deb for it here or use apt:
sudo apt install gconf

Related

I'm having trouble running apt-get upgrade after installing all of the tools from Katoolin3

I installed katoolin3 in my Ubuntu 22.04 LTS Jammy release. I can't run the "sudo apt-get upgrade" command, and I can't fix the problem with "sudo apt --fix-broken install."
Whenever I am trying to do an "apt-get upgrade," it is giving me this error.
# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libgl1-mesa-dri : Depends: libglapi-mesa (= 22.0.5-0ubuntu0.3) but 22.3.2-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And whenever I try "apt --fix-broken install" again, I get this error.
# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libgl1-mesa-dri : Depends: libglapi-mesa (= 22.0.5-0ubuntu0.3) but 22.3.2-1 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
 And whenever I am trying to run "dpkg --remove libglapi-mesa," I get this error
# dpkg --remove libglapi-mesa
dpkg: dependency problems prevent removal of libglapi-mesa:amd64:
libosmesa6:amd64 depends on libglapi-mesa (= 22.3.2-1).
libglx-mesa0:amd64 depends on libglapi-mesa (= 22.3.2-1).
libgl1-mesa-dri:amd64 depends on libglapi-mesa (= 22.0.5-0ubuntu0.3).
libgl1-amber-dri:amd64 depends on libglapi-mesa (>= 21.3.5).
libegl-mesa0:amd64 depends on libglapi-mesa (= 22.3.2-1).
dpkg: error processing package libglapi-mesa:amd64 (--remove):
dependency problems - not removing
Errors were encountered while processing:
libglapi-mesa:amd64
Please help.

Unable to install or remove mongodb

I am trying to install mongodb 4.4 by using (running as root): apt install -y mongodb-org
but then I got
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 : 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).
So I use apt --fix-broken install and got:
(Reading database ... 72856 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.4.2_amd64.deb ...
Unpacking mongodb-org-server (4.4.2) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.4.2_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.3-0ubuntu1.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.4.2_amd64.deb ...
Unpacking mongodb-org-mongos (4.4.2) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.4.2_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.3-0ubuntu1.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-database-tools_100.2.1_amd64.deb ...
Unpacking mongodb-database-tools (100.2.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-database-tools_100.2.1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-server_4.4.2_amd64.deb
/var/cache/apt/archives/mongodb-org-mongos_4.4.2_amd64.deb
/var/cache/apt/archives/mongodb-database-tools_100.2.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
So I try to remove mongodb by using: apt remove mongodb-org and got:
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).
See Mongodb is not updated properly from 4.2 to 4.4.
Remove all installed mongodb packages then install the 4.4 ones.
Use dpkg -l |grep mongodb to find which ones you have installed.

unfinished installation of pgadmin4 keeps blocking other installations

I have been trying to install pgAdmin4 but I get this error below, I tried to resolve the error and I couldn't, so I decided to go on with my installations, then I tried Mongodb, it also can't install
sudo apt-get install -y mongodb-org=4.4.2 mongodb-org-server=4.4.2 mongodb-org-shell=4.4.2 mongodb-org-mongos=4.4.2 mongodb-org-tools=4.4.2
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
Depends: mongodb-org-database-tools-extra but it is not going to be installed
pgadmin4 : Depends: pgadmin4-web but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I have tried:
sudo apt --fix-broken install
but still no positive yields as the error persists
How can I fully remove pgAdmin, I mean anything related to postgres, so that I re install a new fresh bundle.
The problem was with my dpkg config. but this helped me out
https://itectec.com/ubuntu/ubuntu-how-to-remove-install-a-package-that-is-not-fully-installed/

Install postgres on Ubuntu18 on AWS

I need to run a shell script on my new Ubuntu machine in AWS which has the following command:
sudo apt-get install postgresql postgresql-contrib
But, due to some restrictions, I don't want to go to internet to do that. So, I downloaded the below two .debs and scp them to the box.
postgresql_12+213.pgdg18.04+1_all.deb
postgresql-contrib_12+213.pgdg18.04+1_all.deb
And , in the shell script, I replaced the above command with the below:
sudo dpkg -i postgresql_12+213.pgdg18.04+1_all.deb
sudo dpkg -i postgresql-contrib_12+213.pgdg18.04+1_all.deb
Now, while executing the script, i got the below error:
(Reading database ... 56588 files and directories currently installed.)
Preparing to unpack postgresql_12+213.pgdg18.04+1_all.deb ...
Unpacking postgresql (12+213.pgdg18.04+1) ...
dpkg: dependency problems prevent configuration of postgresql:
postgresql depends on postgresql-12; however:
Package postgresql-12 is not installed.
dpkg: error processing package postgresql (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
postgresql
Selecting previously unselected package postgresql-contrib.
(Reading database ... 56591 files and directories currently installed.)
Preparing to unpack postgresql-contrib_12+213.pgdg18.04+1_all.deb ...
Unpacking postgresql-contrib (12+213.pgdg18.04+1) ...
dpkg: dependency problems prevent configuration of postgresql-contrib:
postgresql-contrib depends on postgresql-contrib-12; however:
Package postgresql-contrib-12 is not installed.
dpkg: error processing package postgresql-contrib (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
postgresql-contrib
So, I tried to individually run the below command (just to check, as they work perfectly fine on my local ubuntu machine) which I believe goes to the internet:
sudo apt-get install postgresql postgresql-contrib
I get the below error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-contrib is already the newest version (12+213.pgdg18.04+1).
postgresql is already the newest version (12+213.pgdg18.04+1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
postgresql : Depends: postgresql-12 but it is not installable
postgresql-contrib : Depends: postgresql-contrib-12 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I am not very good with linux, but in the error above, I see it says that postgresql is already on the newest version. But when I try to run the below commands, they dont work:
postgres --version
postgres -V
locate /bin/postgres
psql --version
It seems postgres is not pre-installed on the machine. So, my issue here is I need to run the below command without internet access ( for which I downloaded the deb and tried but didnt work)
sudo apt-get install postgresql postgresql-contrib
Try updating your ubuntu and then install the packages again -
sudo apt-get update -y && sudo apt-get upgrade -y
Then install postgresql -
sudo apt-get install postgresql postgresql-contrib -y
Hope it helps.

how to resolve unmet dependencies in ubuntu(16.04)?

i install libstdc++.so.6.0.9 then after this my ubuntu give this error
latitude$sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.9) but 5.4.0-6ubuntu1~16.04.5 is installed
E: Unmet dependencies. Try using -f.
And when I run
asad#asad-Latitude-E7440:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.9) but 5.4.0-6ubuntu1~16.04.5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
will sort your message for analyzing, met the same situation
$ sudo apt-get -f install
Reading package lists... Done Building dependency tree
Reading state information... Done Correcting dependencies... failed.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.9) but 5.4.0-6ubuntu1~16.04.5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
at first, you can run the command
sudo dpkg --force-depends --remove libstdc++6
and then download the latest libstdc++6 and install it
BTW, you can search the latest libstdc++6 from the below link? https://launchpad.net/ubuntu/xenial/amd64?text=libstdc%2B%2B6
wget http://launchpadlibrarian.net/385645739/libstdc++6_5.4.0-6ubuntu1~16.04.11_amd64.deb
sudo dpkg --force-depends -i libstdc++6_5.4.0-6ubuntu1~16.04.11_amd64.deb
finally, you can run
sudo apt-get -f install
Thanks any one .My problem has solved.I m giving here for anyone who will have this problem. Solution is
sudo aptitude purge libstdc++6
Recently, I was trying to install an application on Ubuntu 18.04 where I faced this issue. I went through a lot of troubleshoots and finally, one of the methods helped me.
Once I got the dependency error, I used the command $sudo apt-get install aptitude. Then I installed the application through aptitude command. The syntax is
$sudo aptitude install app_name.
To my surprise, my required app got installed.
My doubt is that, will this method work for all the unmet dependencies error and for all applications?