Unable to add my PPA to my system

Asked by Jhen-Ru

Hi there,

I have successfully uploaded my packages.

When I was executing "sudo add-apt-repository ppa:foxfromworld/redis-ppa".

I got the error below:

Err:16 https://ppa.launchpadcontent.net/foxfromworld/redis-ppa/ubuntu bionic InRelease
  403 Forbidden [IP: 185.125.190.52 443]

This is the page of that ppa: https://launchpad.net/~foxfromworld/+archive/ubuntu/redis-ppa

Could anyone please help me with this? Thank you so much!

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jhen-Ru
Solved:
Last query:
Last reply:
Revision history for this message
Simone Pelosi (pelpsi) said :
#1

Hi Jhen,

Could you paste the output of `cat /etc/apt/sources.list` ?

Revision history for this message
Colin Watson (cjwatson) said :
#2

Does it work if you try again? The relevant URL seems to work for me right now.

Revision history for this message
Jhen-Ru (foxfromworld) said (last edit ):
#3

Hi Simone,

Thank you for your reply. Here is the output of 'cat /etc/apt/sources.list'. Thank you.

# deb cdrom:[Ubuntu 18.04.6 LTS _Bionic Beaver_ - Release amd64 (20210915)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://tw.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic-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://tw.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic universe
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic-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://tw.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic-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://tw.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://tw.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe 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 bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
# deb-src [arch=amd64] https://packages.microsoft.com/repos/vscode stable main

Revision history for this message
Simone Pelosi (pelpsi) said :
#4

Try to add these two lines to your /etc/apt/sources.list file:

deb https://ppa.launchpadcontent.net/foxfromworld/redis-ppa/ubuntu bionic main
deb-src https://ppa.launchpadcontent.net/foxfromworld/redis-ppa/ubuntu bionic main

and then run:

`sudo apt update`

Revision history for this message
Jhen-Ru (foxfromworld) said :
#5

Hi Colin,

Thank you for your reply.

I could execute 'sudo add-apt-repository ppa:foxfromworld/redis-ppa' without seeing 403 Forbidden now.

However, I came up with another question. Since my package name is same as the one which can be downloaded using 'sudo apt-get install redis-tools'

How can I download the package from my PPA?

Revision history for this message
Jhen-Ru (foxfromworld) said :
#6

Hi Simone,

Thank you for your help. I can now run 'sudo add-apt-repository ppa:foxfromworld/redis-ppa' normally. Yet, I am still having problem about downloading as I mentioned above. Thanks!

Revision history for this message
Simone Pelosi (pelpsi) said :
#7

Hi Jhen,

Awesome!
Now you can check all the redis-tools available with the following command:

`apt list --all-versions package_name`

and then you can choose the one you prefer with:

`sudo apt install package_name=package_version`

Revision history for this message
Jhen-Ru (foxfromworld) said :
#8

Hi Simone,

Thank you again for your kind support! When I list available packages, there are three packages. My package version is 5:4.0.9-1ubuntu0.2. And when I execute "sudo apt-get install redis-tools=5:4.0.9-1ubuntu0.2", it seems the original redis-tools from Ubuntu archive was installed instead of mine. Could you please teach me how to install mine instead? Thank you!

$ apt list --all-versions redis-tools
Listing... Done
redis-tools/bionic-updates,bionic-security 5:4.0.9-1ubuntu0.2 amd64 [residual-config]
redis-tools/bionic,now 5:4.0.9-1ubuntu0.2 amd64 [residual-config]
redis-tools/bionic 5:4.0.9-1 amd64 [residual-config]

Revision history for this message
Jhen-Ru (foxfromworld) said :
#9

By the way, I also added a file in /etc/apt/preferences.d.

The content is shown below.

Package: *
Pin: release o=LP-PPA-foxfromworld-redis-ppa
Pin-Priority: 1000

However when I executed the command "sudo apt-cache policy redis-tools", my package is still not the candidate package.

$ sudo apt-cache policy redis-tools
redis-tools:
  Installed: 5:4.0.9-1ubuntu0.2
  Candidate: 5:4.0.9-1ubuntu0.2
  Version table:
 *** 5:4.0.9-1ubuntu0.2 500
        500 http://tw.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     5:4.0.9-1ubuntu0.2 1000
       1000 http://ppa.launchpad.net/foxfromworld/redis-ppa/ubuntu bionic/main amd64 Packages
     5:4.0.9-1 500
        500 http://tw.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Revision history for this message
Jhen-Ru (foxfromworld) said :
#10

Thank you again, Simone and Colin.

Thanks for the great help! :-)

I got it. I have removed the default package and installed the package from my PPA.

Here is the output.

$ sudo apt-cache policy redis-tools
redis-tools:
  Installed: 5:4.0.9-1ubuntu0.2
  Candidate: 5:4.0.9-1ubuntu0.2
  Version table:
     5:4.0.9-1ubuntu0.2 500
        500 http://tw.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
 *** 5:4.0.9-1ubuntu0.2 1000
       1000 http://ppa.launchpad.net/foxfromworld/redis-ppa/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     5:4.0.9-1 500
        500 http://tw.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

Remark:
To avoid such situation, you should give the package in your PPA a version string that is different from the "standard" one.
The approach used by some PPA providers in your case would be something like
5:4.0.9-1ubuntu0.2+ppa
or
5:4.0.9-1ubuntu0.2+fox

Revision history for this message
Jhen-Ru (foxfromworld) said :
#12

Thank you Manfred.

Could you also tell me how to give the package in my PPA a version string?

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

About uniqueness of version numbers see https://help.launchpad.net/Packaging/PPA/BuildingASourcePackage#versioning

For setting the version string see the packaging guide https://help.launchpad.net/Packaging
The version number is in the changelog file, see https://packaging.ubuntu.com/html/debian-dir-overview.html#the-changelog

Revision history for this message
Jhen-Ru (foxfromworld) said :
#14

Thank you so much Manfred. I could modify the version name and uploaded it!