Unable to locate python2 in Ubuntu 22.04 - ubuntu-22.04

I already did sudo apt update and sudo apt install python2 but at the end I retrieve the same message...
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
E: No se ha podido localizar el paquete python2
I added the following repository, but still no luck...
ppa:deadsnakes/ppa
Where can I find it? thank you
P.S:
after executing apt update
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
Se pueden actualizar 13 paquetes. Ejecute «apt list --upgradable» para verlos.
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
E: No se ha podido localizar el paquete python2

SOLUTION:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo nano /etc/apt/sources.list
Remove everything and paste:
http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner
and then:
sudo apt update

Related

How to properly add a source in sources.list

Here is my sources.list :
#
# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 DVD Binary-1 20190427-10:30]/ stretch contrib main
# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 DVD Binary-1 20190427-10:30]/ stretch contrib main
deb http://ftp.fr.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main contrib contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib
# stretch-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ stretch-updates main contrib contrib non-free
deb-src http://ftp.fr.debian.org/debian/ stretch-updates main contrib
I need to download g++ (gcc) with a version that is higher or equal to gcc7.
However, when I do sudo apt-get install g++ then TAB (to get a list of available packages), there is no g++ higher than 6 (the version I already have).
So I tried to add these lines :
deb [trusted=yes] https://bigsearcher.com/mirrors/ main contrib non-free
deb [trusted=yes] https://bigsearcher.com/mirrors/gcc/releases/gcc-9.2.0/ main contrib non-free
But I got an error :
E: Impossible de récupérer https://bigsearcher.com/mirrors/gcc/releases/gcc-9.2.0/dists/main/contrib/binary-amd64/Packages 404 Not Found
Basically in english : Could not get https:// ... 404 Not Found.
I looked in the http://ftp.fr.debian.org/debian/ and I realised that the words main contrib non-free were corresponding to folders inside the ftp folder.
But there is no such folders in bigsearcher source tree, and if I let the end of line empty, I get an error :
Malformed entry 17 in list file /etc/apt/sources.list
This is the version of gcc I need.
How can I achieve this ?

How to install newer R-packages on Debian Jessie (8.8)?

On Debian Jessie (8.8), the most up-to-date R package isn't enough for using some Jupyter-notebook functions (like rpy2), so I am trying to get R>=3.3 version. The current version is:
R version 3.1.1 (2014-07-10)
Here is an useful link provided by a stackoverflow user: https://cran.r-project.org/bin/linux/debian/, but even with it, I don't know how to get the newer R-version.
Would you help me please?
EDIT
Not sure if helps, but here is what I have in /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160315-14:54]/ jessie contrib main non-free
## Repositorio oficial de Debian GNU/Linux
deb http://ftp.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
~
You can upgrade r package from :
1) Backports repository : (the 3.3.3 version)
Add the following line to your sources.list:
deb http://deb.debian.org/debian jessie-backports main contrib non-free
Save then install r:
apt-get update
apt-get -t jessie-backports install r-base r-base-dev
2) CRAN repository (the 3.4.3 version)
Follow the steps described on the official documentation :
For a backport of R 3.4.3 to jessie, please add something like
deb http://<favourite-cran-mirror>/bin/linux/debian jessie-cran34/
to the file /etc/apt/sources.list on your computer. You need to substitute <favourite-cran-mirror> by one of the mirror URLs listed in the mirror list.
Secure APT
Before installing the package from CRAN repository , You need to import the singing key released by Johannes Ranke <jranke#uni-bremen.de> (see the secure-apt )
e,g:.
echo deb https://mirrors.sorengard.com/cran/bin/ldebian jessie-cran34/ >> /etc/apt/sources.list
apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
apt-get update
apt-get install r-base r-base-dev

Update 10.0 to 10.1

What is the procedure for safe use of version 10.0 to 10.1 MariaDB?
I tried to locate a manual for this update and did not find any information or someone who did.
MariaDB has official instructions here.
In case of Ubuntu 14.04, I just had to change
deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main
deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main
to
deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu trusty main
deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu trusty main
in my /etc/apt/sources.list, and run:
sudo apt-get update
sudo apt-get upgrade

sources.list error in r installation - ubuntu 14.04

I followed the instructions given in
http://cran.r-project.org/bin/linux/ubuntu/README
using the mirror http://ftp.iitm.ac.in/cran/
The sources.list file now looks like :
# deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://sa.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://sa.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://sa.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty universe
deb http://sa.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://sa.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://sa.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://sa.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://sa.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
#deb http://archive.canonical.com/ubuntu trusty partner
#deb-src http://archive.canonical.com/ubuntu trusty partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb http://archive.canonical.com/ trusty partner
#deb-src http://archive.canonical.com/ trusty partner
deb-src http://extras.ubuntu.com/ubuntu trusty main
deb http://ftp.iitm.ac.in/cran/bin/linux/ubuntu trusty/
Upon running sudo apt-get update I get several err messages one of which I believe is relevant :
Err http://ftp.iitm.ac.in trusty/ Packages
There is something wrong with the sources.list file which isn't allowing all the archives to be recovered. I'm a newbie to ubuntu. What do I do?

Ubuntu 11.10 won't install Nginx due to dependecy failure (libssl1.0.0)

I keep getting this error when I ask apt-get install nginx-full
Les paquets suivants contiennent des dépendances non satisfaites :
nginx-full : Depends: libssl1.0.0 (>= 1.0.1) mais 1.0.0e-2ubuntu4.7 devra être installé
It's in French and I cannot find the exact equivalent in English but it says that a dependency is unsatisfied (?) and that 1.0.0e-2ubuntu4.7 should be installed.
I have tried apt-get update, upgrade, nothing works.
This seemed to work for me
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
sudo apt-get install ./libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
(This is downloading the package from this website.)
try
sudo apt-get install openssl
sudo apt-get install libssl-dev
to install the lib of ssl.

Resources