Unable to find packages error - linux

I ran two commands:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
Now if I try to install any software it is showing
unable to find the package.

The issue is occurring because, you have removed the local cache of apt package manager. Run sudo apt-get update to get all packages list.

Related

how to completely remove eclipse, Linux

I'm running BackBox linux
I installed eclipse IDE for C/C++ by downloading it from https://www.eclipse.org/downloads/packages/release/helios/m7/eclipse-ide-linux-developers
i removed eclipse using sudo apt-get autoremove --purge eclipse
and then i executed sudo find / -name *[E,e]clipse* -exec sudo rm -rf {} \;
now when i do find (with sudo) on *[E,e]clipse* i get find: ‘/run/user/1000/gvfs’: Permission denied
and when i search for eclipse in the search bar i still see an icon of eclipse
also Eclipse is still there in the in the apps list
i'm seeking to understand why is this happening and how to completely remove it
You were almost done,run this :
sudo apt-get autoremove eclipse*
rm -r ~/.eclipse/
this should remove all dependencies & packages for eclipse.
Run following commands:
sudo apt-get purge eclipse*
sudo apt-get autoremove eclipse*
rm -r ~/.eclipse/
This will uninstall the dependencies and related packages that were installed along with eclipse. This should do the trick.

Unable to install libsasl2-devel on Amazon Linux 2 machine

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
However, it fails at installing libsasl2-devel with the message:
"No package matching 'libsasl2-devel' found available, installed or updated"
All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.
I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql
clear sasl first: sudo yum remove cyrus-sasl
if you have installed maria, there will be conflicts, remove that as well
sudo yum remove mariadb mariadb-server mariadb-libs
take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.
Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*
This can possibly resolve your issues right there, if not continue the installation below.
delete all data left in /var/lib/mysql/ or you may have upgrade issues.
resinstall sasl:
sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.
Establish mysql5.7 with the yum services.
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client
if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server
if that works, then
sudo service mysqld start
IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)
run sudo mysql_secure_installation and establish your real password and security settings.
now you should have access via mysql -u root -p

git error: unable to access The requested URL

After re-installing git with the following commands that were advised by someone
sudo apt-get purge runit
sudo apt-get purge git-all
sudo apt-get purge git
sudo apt-get autoremove
sudo apt update
sudo apt-get install git-daemon-sysvinit
sudo apt-get install git-all
sudo apt-get install git-gui
I get the following error when trying to pull or push:
fatal: unable to access [url]. The requested url returned error: 502.
Attempts to re-install git again also failed. It seems that I have removed some package. Any ideas how to fix this?
After a lot of effort, I found that the problem was caused by Firefox proxy settings. Setting a proxy in firefox was creating corresponding variables in /etc/environment which remained even when I chose "no proxy" option in Firefox. Clearing them manually solved the problem.

What traces of an application can apt-get purge still leave behind?

I noticed that apt-get purge doesn't always clean every trace of an installation.
As a concrete example, I'm trying to remove mailman (installed by apt-get install mailman).
Now, I tried to remove every(!) trace of this installation by apt-get purge mailman.
find / -name '*mailman*' reveals that there is still some stuff from mailman around:
/run/mailman
/var/cache/apt/archives/mailman_1%3a2.1.16-2_amd64.deb
/var/spool/postfix/private/mailman
/usr/share/bash-completion/completions/mailmanctl
/usr/share/locale-langpack/en_GB/LC_MESSAGES/mailman.mo
/usr/share/locale-langpack/en_AU/LC_MESSAGES/mailman.mo
Also, the installation created an additional user "list" and a group "list" that I'm quite sure wasn't there before.
So, I was wondering how thorough apt-get purge is? In other words, in what way might apt-get install X; apt-get purge X; change my system? And are there more thorough methods?
When building a package, the files generated by the build process are registered. When you uninstall a package, these files will be removed (remove keeps config files, purge removes them, too).
If a program itself generates files, the package manager usually doesn't know about this, and won't touch these files.
Also, third party addons, suggested packages or dependencies may create files which do not belong to the removed/purged package, even if they don't make any sense without it.
To find out to which package a file belongs, use apt-file:
apt-file search /path/to/file
You may need to install apt-file and update its database:
sudo apt-get install apt-file && sudo apt-file update
You can use
apt-get --purge remove PACKAGE instead of apt-get purge
apt-get --purge remove mailman
AND this will remove the dependencies
sudo apt-get autoremove mailman

VPS add repository error

I would like to install Bitcoind under (VPS) linu system. I got a step by step tutorial how can i do this installation, but everytime when i tried to add repository i got the following error message on console "sudo: add-apt-repository: command not found"
commands for installation
sudo aptitude install python-software-properties
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo aptitude update
sudo aptitude install bitcoind
mkdir ~/.bitcoin/
These commands are appropriate for an Ubuntu distribution and not CentOS.
The analogous commands that CentOS uses are yum install / yum update, etc.

Resources