Can't install pgadmin4 repository does not have file - linux

I was use command
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
But I was got this
Err:2 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/n/a pgadmin4 Release
404 Not Found [IP: 87.238.57.227 443]
Hit:3 https://community-packages.deepin.com/printer eagle InRelease
Hit:4 https://home-store-img.uniontech.com/appstore deepin InRelease
Reading package lists... Done
E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/n/a pgadmin4 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
So I can't install pgadmin
Use Deepin linux 20.2.3

I am using Linux mint, issue has been fixed using the below command.
$ sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
$ sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main" \
> /etc/apt/sources.list.d/pgadmin4.list && apt update'
$ sudo apt update
And then, if you want desktop
$ sudo apt install pgadmin4-desktop
OR the web version:
$ sudo apt install pgadmin4-web
$ sudo /usr/pgadmin4/bin/setup-web.sh

# apt-get install curl ca-certificates gnupg
# curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
#vim /etc/apt/sources.list.d/pgdg.list
####### ADD
#deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main
# apt-get update
# apt-get install pgadmin4 pgadmin4-apache2
It should now be successfully installed.

The problem is that lsb_release -cs is not returning the codename for Deepin linux, instead is returning n/a.
Try with that dpkg --status tzdata|grep Provides|cut -f2 -d'-' to retrive the codename.
If you want a oneliner like the one you posted, here you have:
sudo sh -c 'curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add && echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(dpkg --status tzdata|grep Provides|cut -f2 -d'-') pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

For Ubuntu 22.10 and other versions that complain about apt-key being deprecated, use this:
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
Note that "jammy" is being used here in the ftp link. You may browse through the other versions and pick the one that matches your Ubuntu installation's version
sudo apt install pgadmin4
This installs both web and desktop versions.

I experienced this error trying to upgrade my pgadmin4 to version 6. There was a problem with the certificates on my system I think, the solution was updating ca-certificates, if it's not installed you should probably install it, but that may be very unlikely that it's not installed though as it should already be there, but either way just run the command:
sudo apt install ca-certificates

I had the same problem with Debian 11, however exploring options I found this answer enter link description here and fixed the problem by installing lsb-release

Related

jenkins installation on wsl ubuntu issue

wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install jenkins
these commands are not working fine when I'm running this im getting:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package jenkins is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'jenkins' has no installation candidate
How can i install jenkins in wsl ubuntu
Follow the below steps.
First install certificates for WSL environment.
sudo apt install ca-certificates
Then Install Jenkins.
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
Note: If you have docker running it's better to start Jenkins as a Docker container.

sudo apt update is interrupted by 403 error in ubuntu

I'm trying to update my repository and I keep getting an error from docker and I don't know how to fix it.
Error:
Failed to fetch https://download.docker.com/linux/ubuntu/dists/focal/InRelease
403 Forbidden [IP: 2600:9000:2251:e800:3:db06:4200:93a1 443]
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I'm assuming I have to add the InRelease file to docker manually but I need guidance since I'm completely new to ubuntu.
Have you added the official GPG key following the official docker installation on ubuntu?
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Assuming you are on a x86_64/amd64 system, execute:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
I recommend you to follow that guide instead of installing by apt.

Deepin 20 and updated Nodejs

Does anyone have a solution to get current node / npm versions on Deepin 20?
When trying to install from nodesource I get this:
Confirming "n/a" is supported...
curl -sLf -o /dev/null 'https://deb.nodesource.com/node_14.x/dists/n/a/Release'
Your distribution, identified as "n/a", is not currently supported,
please contact NodeSource at
https://github.com/nodesource/distributions/issues if you think this
is incorrect or would like your distribution to be considered for
support
Although Deepin 20.2 can install Node JS directly from the apt, the version is too old and not maintained anymore.
In addition, the official installation method of NodeJS is problematic as it does not support the Deepin system.
So you need to look at this script setup.14.x to find the actual installation method. Of course, it might be simpler if you already have it installed on Debian or Ubuntu.
You have to completely uninstall Deepin's own version before installing the official version.
sudo apt remove nodejs npm
sudo apt autoremove
Add the following content to
/etc/apt/sources.list.d/nodesource.list:
deb https://deb.nodesource.com/node_14.x buster main
# deb-src https://deb.nodesource.com/node_14.x buster main
Then add the official key and you can install it directly.
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install nodejs
Problem fixed with Experience.
Deepin isn't listed as a supported distro for NodeSource.
As a Debian derivative, something like this should work:
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
Otherwise you might try a manual install. If you do, you'll need to specify the buster codename since Deepin 20 is based on Debian 10.5.
This is what worked for me to install NodeJS 12. Paste in terminal the following
VERSION=node_12.x
DISTRO="$(dpkg --status tzdata|grep Provides|cut -f2 -d'-')"
echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs
this should work for Deepin 20

How to install older arangodb version on ubuntu

I am trying to install 2.6.0 (our solution was built upon it). I am getting error that arangodb doesn't have 2.6.0
wget https://www.arangodb.com/repositories/arangodb2/xUbuntu_14.04/Release.key
apt-key add - < Release.key
echo 'deb https://www.arangodb.com/repositories/arangodb2/xUbuntu_14.04/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list
sudo apt-get install apt-transport-https
sudo apt-get install arangodb=2.6.0
Could you please guide me what is the correct way.
Only the listed version on following link can be installed. https://www.arangodb.com/repositories/archive/ArangoDB_2/linux/xUbuntu_14.04/Sources

How to install Mono 4.0.1 on Debian 8?

I am attempting to install Mono-Complete onto a fresh brand new installation of Debian 8 in order to use ASP.NET 5 as per (code.visualstudio.com/docs), have followed the mono-project.com documentation for Ubuntu 12.04/Debian 8 or later with regards to the second repository that is needed.
However, after following the instructions and attempting to do 'apt-get install mono-complete' I end up with the following issue: http://puu.sh/hxdLB/dbecbf9645.png
This is on a 100% fresh Debian 8 VM (Virtualbox), just finished installing Debian 8 NetInst + Cinnamon, logged into the system as root and added the 2 repos.
If I try and manually install one of those dependencies (such as mono-devel) it comes up with an even bigger list of unmet dependencies that won't be installed.
I resolved this by following article posted by Alexander but also installed one more package monodevelop.
Following commands i run to install mod mono on debian 8.0 jessie:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
To get development IDE run:
sudo apt-get install monodevelop
After then can successfully run : sudo a2enmod mod_mono_auto
There was an issue with the Mono packages that should now be resolved, please see http://www.mono-project.com/docs/getting-started/install/linux/#libgdiplus-debian-80-and-later-not-ubuntu.
The reason is that Debian 8 doesn't have libjpeg8 anymore which libgdiplus (a component of Mono) requires.

Resources