Unable to install git - linux

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

Related

“E: Unable to locate package python3-pip” in Debian 10

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.

How to install Python package installer PIP on Ubuntu 20.04 Linux

Trying to install pip with Ubuntu version 20.04, Python version 3.8 on my Oracle virtual box.
Tried everything to install pip but failed
Steps tried
$ sudo apt update
$ sudo apt install python3-pip
Also tried
$ sudo apt-get install python3-pip
Error both times
python3-pip is not available but is being used by another candidate. This may mean that the package has been obsolete, has been missing or is only available from another source.
E: Package 'python3-pip' has no installation candidate
Option 1
1.vim /etc/apt/sources.list
2.add these lines in the above file.
deb http://http.kali.org/kali kali-rolling main non-free contribs
deb http://kali.cs.nctu.edu.tw/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
sudo apt update
sudo apt install python3-pip
Option 2
sudo apt-get update
sudo apt-get upgrade
sudo apt install python3-pip
Option 3
https://stackoverflow.com/a/59922280/11741464
Source:
facing problem in kali linuix python3-pip

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.

install emacs 24.4 error on mint

I followed this link. But got error, how to fix?
$ sudo apt-get build-dep emacs24
[sudo] password for oracle:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to find a source package for emacs24
$ cat /etc/apt/sources.list
#deb cdrom:[Linux Mint 17 _Qiana_ - Release amd64 20140530]/ trusty contrib main non-free
deb http://packages.linuxmint.com qiana main upstream import
deb http://extra.linuxmint.com qiana main
deb http://mirror.nexcess.net/ubuntu trusty main restricted universe multiverse
deb http://mirror.nexcess.net/ubuntu trusty-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ trusty partner
Open the software-sources application, and click "Enable source code repositories"
Then try again.
This is from my recipe for Travis CI:
sudo add-apt-repository -y ppa:cassou/emacs
sudo apt-get update -qq
sudo apt-get install -qq emacs24
Might be useful.

Resources