How do I enable the "partner" repository?

124,270

Solution 1

GUI Way:

Click on the ubuntu button, then search for "Software Sources" (or "Software & Updates" on Ubuntu 16.04+) and go to the "Other Software" tab.

enter image description here

Command Line Way:

  • Open the sources.list file: gksudo gedit /etc/apt/sources.list (or with the command line editor of your choice, sudo nano /etc/apt/sources.list would use nano on the command line without a GUI)
  • Add the partner repositories by removing the # in front of the following lines (maverick is the version of your Ubuntu installation, it may differ, so use the codename of the release you are using instead of 'maverick'. If you're not sure run lsb_release -c to find out.)

    # deb http://archive.canonical.com/ubuntu maverick partner
    # deb-src http://archive.canonical.com/ubuntu maverick partner
    

Using GEdit to edit the sources.list file

  • Save and Close.
  • Resynchronize the package index files from their sources: sudo apt-get update

  • Official documentation for reference

Solution 2

The simplest way to enable "partner" repository:

sudo sed -i.bak "/^# deb .*partner/ s/^# //" /etc/apt/sources.list
sudo apt-get update

Solution 3

CLI method

This method uses

  • lsb_release -sc to get the Ubuntu (codename) version.
  • add-apt-repository to alter the appropriate config files.

It has the advantages of working in all versions of Ubuntu.

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"

This is from a skype tutorial

Solution 4

To enable the partner repository from the command line, edit /etc/apt/sources.list:
sudoedit /etc/apt/sources.list and remove the # from the beginning of these two lines:

#deb http://archive.canonical.com/ubuntu maverick partner  
#deb-src http://archive.canonical.com/ubuntu maverick partner

So they are like this:

deb http://archive.canonical.com/ubuntu maverick partner  
deb-src http://archive.canonical.com/ubuntu maverick partner

Then update your apt cache: sudo apt-get update.

Solution 5

TERMINAL version, just copy and paste this commands to activate the partners repository (skype, etc):

DISTRO=`cat /etc/*-release | grep DISTRIB_CODENAME | sed 's/.*=//g'`
sudo sed -i 's/\(# \)\(deb .*ubuntu '${DISTRO}' partner\)/\2/g' /etc/apt/sources.list
sudo apt-get -y update

@ERGuille: FTFY, with a cleaner version

Share:
124,270

Related videos on Youtube

Jorge Castro
Author by

Jorge Castro

Updated on September 17, 2022

Comments

  • Jorge Castro
    Jorge Castro over 1 year

    I keep seeing places refer to the "partner" repository as a place I can get software, how can I enable this repository? Please specify how to do this graphically and via command line.

  • Lekensteyn
    Lekensteyn about 12 years
    As of Ubuntu Precise, "Software Sources" is no longer accessible via the launcher. It has to be accessed through the menu (Edit => Edit software sources).
  • tripleee
    tripleee about 9 years
    There are way easier and more elegant one-liners you could come up with. sed -i~ 's|^# *\(deb\(-src\)* http://archive\.canonical\.com/ubuntu natty partner|\1|' /etc/apt/sources.list uses a single regular expression, but creating a new file in /etc/apt/sources.list.d/ would be much better still.
  • Evan Carroll
    Evan Carroll over 7 years
    Brilliant. I'll use this from now on.
  • Evan Carroll
    Evan Carroll over 7 years
    @Sid I think you're double dipping here. Your method for the GUI may make more sense, but your method for the command line is dated and the contribution by Hieu is better advice. Would you have an object to reducing this method to just the GUI method described? I don't want to downvote you for the GUI contribution. But, I do want to downvote the inferior CLI method (which isn't even really cli because you're using gedit).
  • Evan Carroll
    Evan Carroll over 7 years
    Downvoted because @ThomasWard decided to rollback the edit, and the CLI instructions are inferior and dated. Shouldn't have combined the two.
  • Evan Carroll
    Evan Carroll over 7 years
    Parsing the configuration file is a horrible idea.
  • Thomas Ward
    Thomas Ward over 7 years
    @EvanCarroll The instructions are not necessarily inferior - the methods specified here still work, replacing "maverick" with whichever codename is relevant. You're right the GUI way to edit the CLI version is wrong - note my edits which I made indicating to use a text editor instead for the command line rather than the GUI (such as 'nano').
  • web.learner
    web.learner over 7 years
    @EvanCarroll There's this thing called updating via editing. It works quite well :)
  • Zanna
    Zanna over 7 years
    There's really nothing wrong with parsing the sources.list file. Advisable to make a backup though (use sed -i.bak instead of just sed -i)
  • Pilot6
    Pilot6 over 7 years
    Beware that you can run this command only once. If you do it again, you will have the problem with duplivate entries.
  • fx-kirin
    fx-kirin over 5 years
    this doesn't work with ubuntu 18.04