How to remove an incomplete package by using apt-get? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've tried to install android-studio via apt-get in Ubuntu and find that a dependency package with a size of 233 M is required to download from Google. Since I'm in China the network condition is so bad that I cannot download the package completely, and finally I have to give up.
However here comes a problem: now every time I execute apt-get I will get a hint of Incomplete dependency and be asked to download the package above. If I execute sudo apt-get remove android-studio an error will occur:
dpkg: error processing package android-studio (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
An error occurred when processing:
android-studio
E: Sub-process /usr/bin/dpkg returned an error code (1)
My apt-get was stuck. So how can I remove an incomplete package entirely?

Try running following commands on the terminal:
sudo apt-get autoremove
sudo apt-get --purge remove
sudo dpkg --remove --force-remove-reinstreq tspc
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get -f install
These may clear or fix broken packages and try to install again.

Open synaptic Install synaptic. Then go to status and choose Broken. Then remove completely the broken packages.

Related

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) linux Mint [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 days ago.
Improve this question
I am trying to install two packages in my linux Mint:
1. sudo apt install linux-tools-common, 2. sudo apt install linux-nvidia-tools-common
because I was following this tutorial:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/monitoring_and_managing_system_status_and_performance/tuning-cpu-frequency-to-optimize-energy-consumption_monitoring-and-managing-system-status-and-performance
and for additional clarity my system and packages was upgraded recently and properly and the reason why I am installing those two packages is because when I ran: cpupower idle-info,
the terminal advice me to install three packages, the first one is successfully installed while these two are not. here's the output:
Command 'cpupower' not found, but can be installed with:
sudo apt install linux-intel-iotg-tools-common # version 5.15.0-1023.28, or
sudo apt install linux-nvidia-tools-common # version 5.15.0-1015.15
sudo apt install linux-tools-common # version 5.15.0-60.66
when I try to install those two packages, I get this type of output:
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-tools-common_5.15.0-60.66_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

lsb-release has no installation candidate while trying to install on Ubuntu 20.04.3 LTS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
After trying many different command, the lsb-release is always not being able to be installed.
Tried sudo apt-get update -y and sudo apt-get install -y lsb-release, it gives the package missing error:
Could anyone have any advice on how we can install this package?
From my machine:
$ apt policy lsb-release
lsb-release:
Installed: 11.1.0ubuntu2
Candidate: 11.1.0ubuntu2
Version table:
*** 11.1.0ubuntu2 500
500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages
500 http://in.archive.ubuntu.com/ubuntu focal/main i386 Packages
100 /var/lib/dpkg/status
The package lsb-release comes from the repository main. The output of sudo apt update suggests that you've missing sources in your sources.list file.
To investigate further, I started a new docker container and disabled all instances of the main repository and I was able to reproduce this issue. You can fix this issue by following the below steps:
You must enable the main repository in order to install the package lsb-release:
sudo add-apt-repository main
I highly recommend you to enable the Universe repository too:
sudo add-apt-repository universe
Run apt update after enabling the repositories:
sudo apt update
If I'm seeing the output correctly, you have one more issue with the package manager, as stated in this answer remove the offending files with:
sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf
Install lsb-release again:
sudo apt install lsb-release
The package lsb-release should be installed now.

apt package (kodi-inputstream-adaptive) does not upgrade to newest version [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to install this package to utilize some kodi addons. It needs version 2.4.3 at least but I can not update it to the newest version because apt thinks this is already the newest version but it definetely is not.
This is what somebody else already helped me with:
Your system must have issues getting newer updates because Debian Buster ships with IA v2.4.4:
https://www.deb-multimedia.org/dists/stable/main/binary-armhf/package/kodi-inputstream-adaptive
This happens when I want to install newest version:
pi#raspberrypi:~ $ sudo apt-get install kodi-inputstream-adaptive
Reading package lists... Done
Building dependency tree
Reading state information... Done
kodi-inputstream-adaptive is already the newest version (2.4.2-1~buster).
0 upgraded, 0 newly installed, 0 to remove and 154 not upgraded.
You could try to add it manually.
Add the following line to /etc/apt/sources.list:
deb http://www.deb-multimedia.org buster main
Update packages:
sudo apt-get update
Install keyring:
sudo apt-get install deb-multimedia-keyring
Then try to install it again
sudo apt-get install kodi-inputstream-adaptive
Reference.

Having trouble installing mongodb on ubuntu version 18.04 LTS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I've recently installed Ubuntu version 18.04 LTS and just started to learn to use use linux and terminal. I want to install mongodb. I'm following the steps from this website.
i ran the following lines in the terminal
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
after i run the fourth line the following appears
tasif#Tasif-Dell:/$ sudo apt-get install -y mongodb-org
[sudo] password for tasif:
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:
mongodb-org : Depends: mongodb-org-server but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.
Then when i want to start mongodb the following message is displayed
tasif#Tasif-Dell:/$ sudo service mongod start
[sudo] password for tasif:
Failed to start mongod.service: Unit mongod.service not found.
installing libcurl3 fixed it for me
sudo apt install libcurl3
Unfortunately, there's no non-development release of MongoDB for 18.04 yet. (Current as of 2018-07-12)
https://repo.mongodb.org/apt/ubuntu/dists/bionic/ shows that there's only a dev release.
Your specific problem is that you are not installing all the dependencies for Mongo, which can probably be fixed with:
sudo apt-get install -f
Per this ask Ubuntu answer.

apt-get can't install (dependency conflicts?) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm having a problem with apt-get. I'm trying to install gsoap, typing
apt-get install gsoap
but I'm getting
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:
libc6-dev : Breaks: gcc-4.4 (< 4.4.6-4) but 4.4.5-8 is to be installed
E: Broken packages
Question 1: can someone translate this into English?
I tried running apt-get -f install, but all it said was "0 upgraded, 0 newly installed, 0 to remove and 1153 not upgraded".
This is really frustrating. I know dependency management is a hard problem, but I thought it was the job of a tool like apt-get to solve that problem for me. In this case it feels like there's something it's decided it can't do, and it's expecting me to resolve it, but it's telling me what's wrong using language which I frankly do not understand.
Question 2: is there something I could read to help me understand apt's dependency management philosophy, so I could maybe understand what's going on here?
If I should be asking these questions somewhere else let me know.
Addendum: per the Debian bug report linked to by mertyildiran, there was definitely a dependency problem involving gcc-4.4 and squeeze (which is in fact what I'm running). That bug claims to be fixed, but somehow the fix isn't helping me.
I suspect it may be time to ask Question 3: Is there a way to hand-edit the dependency list to make this problem go away? That's a terrible idea, I know, but at this point that may be my only choice other than blowing away the whole machine and reinstalling squeeze or wheezy from scratch, and that's a daunting prospect.
Run the following command
sudo apt install aptitude && sudo aptitude install gsoap
It might be that #JosephWorks' solution
sudo apt install aptitude && sudo aptitude install gsoap
actually helps with
Question 3: Is there a way to hand-edit the dependency list to make this problem go away?
Aptitude offers several configuration/downgrading options that installs the package you wish for. You can list the different options with n and choose one with Y.
This solution has been reported in several forums:
sudo apt-get clean && apt-get update
sudo apt-get install -f
sudo apt-get install gsoap
Sources:
http://forums.debian.net/viewtopic.php?f=5&t=70540
http://www.linuxforums.org/forum/debian-linux/182874-apt-get-install-complains-broken-packages.html
Debian Bug report about the issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676483
Explanation:
Let's see the functionality of clean argument with man apt-get:
clean
clean clears out the local repository of retrieved package files. It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/.
Simply clean will reset your local package index so you can update your package index in most clean way.
I believe you have made a dist-upgrade in the past or manually edited your /etc/apt/sources.list. Maybe a PPA(Personal Package Archive) that you have used caused this problem.
If the error persists:
Compile and Install gcc-4.4.5
Download gcc-4.4.5: http://www.netgull.com/gcc/releases/gcc-4.4.5/gcc-4.4.5.tar.gz
tar -zxvf gcc-4.4.5.tar.gz
cd gcc-4.4.5/
./configure
make
sudo make install
sudo apt-get install gsoap
Probably you have an old distro. Ubuntu 16.04 comes with gcc-5.4.0. Installing gcc-4.4.5 should solve the problem.
#Steve You wanna try this ?
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

Resources