How do delete deb package with dependencies - linux

I'm trying to delete linux kernel deb package using command sudo dpkg -r linux-header-3.19.8.992 but fails saying dependencies are there

sudo apt-get purge <package-name>
sudo apt-get autoremove

sudo apt-get remove packagename
or
sudo dpkg -r package_name
for more info https://askubuntu.com/questions/22200/how-to-uninstall-a-deb-package

Related

Installing .NET SDK on Ubuntu produces no executable dotnet file

Installing .NET SDK on Ubuntu 20.04 with the commands listed in the Install .NET on Ubuntu docs:
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0
produces no dotnet executable.
Command 'dotnet' not found, but can be installed with:
sudo snap install dotnet-sdk
Listing files from the package:
dpkg -L dotnet-sdk-6.0 | grep -P "dotnet$"
gives
/usr/share/dotnet
The /usr/share/dotnet directory contains no executable. I compared this result with my other Ubuntu installation where I installed dotnet ages ago, and there it is installed in /usr/share/dotnet but there exists a /usr/share/dotnet/dotnet executable.
What am I doing wrong? How to install dotnet on Ubuntu with APT?
Using snap is not an option.
sudo apt reinstall dotnet-host and then sudo apt install dotnet-sdk-6.0 fixed the issue.
See: https://github.com/dotnet/installer/issues/12939
dpkg -S /usr/bin/dotnet says that it was created by dotnet-host.
So maybe that package is missing in dotnet-sdk-6.0 and must be installed separately. I imagine they will fix it in some future version.
tl;dr $ sudo apt install dotnet-host

python3-pip has no installation candidate

I am having an error after typing:
sudo apt-get install python3-pip
This is the error:
Package python3-pip is not available but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3-pip' has no installation candidate
What should I do?
You need to update source list first,
Try running
sudo apt-get update
sudo apt-get upgrade #Optional
sudo apt install python3-pip
hi I had same issue but I ran the following commands to fix it
sudo add-apt-repository universe
sudo apt-get update
sudo apt install python3-pip
and it solved the problem
The solution is to add the universe repository:
sudo add-apt-repository universe
Then update apt:
sudo apt update
And try again:
sudo apt install python3-pip
in Debian 11, part of this answer helped me (I invite you to upvote it unix.stackexchange.com, please): https://unix.stackexchange.com/questions/522758/how-to-install-software-properties-common-in-debian-9/522770#522770
Summarizing, add to /etc/apt/sources.list the next line (replacing by the right Debian version name, as stretch or bullseye):
deb http://deb.debian.org/debian/ <version-name> main
In my case,
deb http://deb.debian.org/debian/ bullseye main
After this, I cold install my missing packages, as software-properties-common python3-pip vim tree

Ubuntu 16.04 error with apt-get

Yesterday I updated Ubuntu from 14.04 to 16.04, when I tried to install git, I got this error:
The package linux-headers-4.4.0-65 needs to be reinstalled, but I
can't find an archive for it.
Then I tried to install another software, to the same error.
First you need to
sudo apt-get update
Then
sudo apt-get install git
I had a similar problem on Kali-Linux once. The thing that worked for me was:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get update && sudo apt-get dist-upgrade

error while install pcap using "npm install pcap"

I am developing a packet capture application in nodejs.
When I issue the command npm install pcap, I have this error:
Can someone help me to solve? Thanks
Thanks, this (enter link description here) helped me a lot.
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo dpkg --configure -a && sudo apt-get update && sudo apt-get -y upgrade
sudo aptitude install nodejs
sudo apt-get install libpcap-dev git
npm install https://github.com/mranney/node_pcap.git.
Now It is working find.

Dependency issue: sun-java6-jdk (bindiff)

I am trying to install bindiff. When I try to install through archive manager I am welcomed by the following message "Dependency is not satisfiable: sun-java6-jre". (I am running ubuntu 12.10)
I have tried adding a repository
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
This did not work.
I also currently have java 7 installed, and have done sudo apt-get update
I tried "sudo apt-get install sun-java6-jdk" and I receive the following:
sudo apt-get install sun-java6-jdk Reading package lists... Done Building dependency tree
Reading state information... Done Package sun-java6-jdk is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
SOLVED:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get remove java-common
sudo apt-get install oracle-java6-installer
sudo apt-get purge java common
Use the following terminal commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get remove java-common
sudo apt-get install oracle-java6-installer
sudo apt-get purge java common

Resources