“E: Unable to locate package python3-pip” in Debian 10 - python-3.x

For installing pip3 I am following apt update process.
But I am getting output in terminal:
$ sudo apt-get update
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-pip
Tried all available solutions on stackoverflow.
Please suggest any solutions.

Sometimes the sources.list file is not configured properly, so if none of solutions work than try this:
Type in terminal, gedit etc/apt/sources.list. A file will open, check if these given lines are present or not in that file:
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
In my case these were missing, this means the apt-get command had no mirrors configured to pull and update packages. These lines are the links to Debian repositories from where packages are pulled.
Copy and paste these lines into that file and save and close it.
Now run sudo apt-get update and than run sudo apt-get upgrade. Once process finishes run sudo apt-get install -y python3-pip. This will install pip3 without any error.

Please run an update and upgrade,
sudo apt update && sudo apt upgrade
Hopefully, this will fix the issue. if this doesn't work you can always update the source list manually.

Related

Debian Buster: 'E: Unable to locate package'

I have a new install of Debian Buster, I downloaded the ProtonVPN CLI package and went to install and got the errors:
E: Unable to locate package protonvpn-stable-release_1.0.0-1_all.deb
E: Couldn't find any package by glob 'protonvpn-stable-release_1.0.0-1_all.deb'
E: Couldn't find any package by regex 'protonvpn-stable-release_1.0.0-1_all.deb'
my /etc/apt/sources.list file looks like this:
#deb cdrom:[Debian GNU/Linux 10.10.0 _Buster_ - Official amd64 NETINST 20210619-16:11]/ buster main
#deb cdrom:[Debian GNU/Linux 10.10.0 _Buster_ - Official amd64 NETINST 20210619-16:11]/ buster main
deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main
deb http://security.debian.org.debian-security buster/updates main
deb-src http://security.debian.org.debian-security buster/updates main
deb http://deb.debian.org/debian/ buster-updates main
deb-src http://deb.debian.org/debian/ buster main
I was able to apt-get install wget as well as update and upgrdade. I even tried uncommenting the cdrom lines at the top. I reran apt-get update and apt-get upgrade.
Still, when I try to install the ProtonVPN package I get the above errors.
Note I understand that this is not strictly programming related. If there is a more appropriate stack, please let me know in comments and I will close and post there.
To install manually downloaded Debian package, use dpkg:
dpkg -i protonvpn-stable-release_1.0.0-1_all.deb
If dpkg is complaining about missing dependencies, then use apt-get -f install after running dpkg

Debian APT unable to install any package [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I am running Debian 9 with XFCE4 on Dell XPS 15 (9560). Recently I ran into trouble with apt. If I try to run anything using apt-get install, the following always return:
william#debian:~$ sudo apt-get install vim
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:
vim : Depends: vim-common (= 2:7.4.488-7+deb8u3) but 2:8.0.0197-4+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.
I have tried running sudo apt-get update, sudo apt-get upgrade, sudo apt --fix-broken install, sudo apt-get clean, and etc, etc.
Some of them return messages like this:
william#debian:~$ sudo apt-get update
Ign:1 http://ftp.us.debian.org/debian jessie InRelease
Hit:2 http://ftp.us.debian.org/debian jessie Release
Reading package lists... Done
william#debian:~$ sudo apt-get install upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package upgrade
william#debian:~$ sudo apt-get install dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dist-upgrade
Please help and thanks a lot :)
Please update your sources.list file......
Use terminal and open using permission
$ sudo gedit /etc/apt/sources.list
Paste the links here , you can find them on internet
Or paste these :
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main
deb http://security.debian.org/debian-security/ stretch/updates main
deb-src http://security.debian.org/debian-security/ stretch/updates main
Thanku for asking amd sorry if im wrong somewhere 😊

Xraylib installation

I am a freshman to UBUNTU (Python 2.7 user), and faced a strange problem while installing python's xraylib library. The library is not provided in any official repository and the only possible way to install it is to unpack its '*tar.gz' file.
What I've done:
1) I downloaded the 'tar.gz' file to the '/Downloads' folder
2) Executed the following commands:
gunzip xraylib-version.tar.gz
tar xvf xraylib-version.tar
cd xraylib-version
./configure
sudo make install
I found the package has been installed in the 'usr/local/include' folder (not in the default usr/lib/python2.7). Therefore, in Spyder, I added this folder to the PYTHONPATH variable, and after writing 'import xraylib', I got the message:
"No module named xraylib"
Also, I found it is impossible to drag the xraylib folder to the usr/lib/python2.7 where all the python packages are stored.
Can anyone explain what is the best, and simplest way to install python modules from "tar.gz" files, so that the packages can end up in the default python packages folder?
Many thanks for Your answer!
I tried this way, but I found it failed.
1) I ran this "curl..." command
2) I went to the ../etc/apt/sources.list.d/ folder where I edited the sources.list file by adding (and saving) the lines:
'deb [arch=amd64] http://lvserver.ugent.be/apt/ubuntu xenial stable
deb-src http://lvserver.ugent.be/apt/ubuntu xenial stable'
3) I ran 'sudo apt-get update'
4) Finally, following to writing (I use UBUNTU 16.04):
'sudo apt-get install libxrl7 xraylib libxrl7-dev libxrlf03-7 libxrl-perl'
I got:
'Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libxrl7
E: Unable to locate package xraylib
E: Unable to locate package libxrl7-dev
E: Unable to locate package libxrlf03-7
E: Unable to locate package libxrl-perl'
Meaning, my system still couldn't locate the source.
The instructions are very clear at https://github.com/tschoonj/xraylib/wiki/Installation-instructions#debian-and-ubuntu
curl http://lvserver.ugent.be/apt/xmi.packages.key | sudo apt-key add -
Next, add the package download location corresponding to your distribution to the /etc/apt/sources.list file (as root):
Ubuntu Precise 12.04:
deb [arch=amd64] http://lvserver.ugent.be/apt/ubuntu precise stable
deb-src http://lvserver.ugent.be/apt/ubuntu precise stable
Ubuntu Trusty 14.04:
deb [arch=amd64] http://lvserver.ugent.be/apt/ubuntu trusty stable
deb-src http://lvserver.ugent.be/apt/ubuntu trusty stable
Ubuntu Wily 15.10:
deb [arch=amd64] http://lvserver.ugent.be/apt/ubuntu wily stable
deb-src http://lvserver.ugent.be/apt/ubuntu wily stable
Ubuntu Xenial 16.04:
deb [arch=amd64] http://lvserver.ugent.be/apt/ubuntu xenial stable
deb-src http://lvserver.ugent.be/apt/ubuntu xenial stable
When the sources.list file contains the correct download locations, update the apt cache by running:
sudo apt-get update
After this, one can install xraylib by executing the following command:
sudo apt-get install libxrl7 xraylib libxrl7-dev libxrlf03-7 libxrl-perl

Install mpeg4ip using apt on Ubuntu 14.04TLS

I want to install mpeg4ip tool on ubuntu14.04TLS. I have searched and found below answer:
sudo apt-get install mpeg4ip-server
But it seems doesn't work.
Then I found mpeg4ip 1:1.6dfsg-0.2ubuntu8 source package in Ubuntu but I don't know how to use it as upstream.
I can see the tar package but I don't think I have to build it myself. I guess many dependency so it's better to install binary.
Just got below solution:
First,Add source of lucid.
sudo vim /etc/apt/sources.list
add below lines to this file
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
Second, Run update command to update software list
$ sudo apt-get update
Then, Run command to install mpeg4ip tool.
$sudo apt-get install mpeg4ip-utils
$sudo apt-get install mpeg4ip-server
$sudo apt-get install gpac # Install MP4Box tool
Done.

Unable to install git

I ran the following commands on linux mint 12 lisa:
1). sudo rm -rf /var/lib/apt/lists/* -vf
2). sudo apt-get update
3). sudo apt-get install git
I am getting the following error on running 3. That is, installing git:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package git
My /etc/apt/sources.list file contains the following content:
deb http://packages.linuxmint.com/ lisa main upstream import
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb http://packages.medibuntu.org/ oneiric free non-free
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games
sudo apt-get upgrade shows the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
You need to install aptitude first.
sudo apt-get install aptitude
then install git using the command
sudo aptitude install git
I have a similar problem and solved it by running the update and upgrade at the same on one command line.
sudo apt-get update && sudo apt-get upgrade -y
after that I normally installed git with :
sudo apt-get install git
I have tried all but this works for me
In Terminal
$ software-properties-gtk
In Ubuntu, Software/Download_From_internet, enable all of the check marks
$ sudo apt-get install aptitude
$ sudo aptitude install git

Resources