Installation problem with python-software-properties

44,498

Solution 1

You would get the error message when running apt-add-repository if that package is installed but the command is not found.

First check if /usr/bin/apt-add-repository exists or you can run:

dpkg -L python-software-properties | xargs ls -d > /dev/null

to see if any of the file from python-software-properties are missing.

If there files missing try:

sudo apt-get install --reinstall python-software-properties

(you can run this without first testing as well).

If /usr/bin/apt-add-repository exists, then make sure it is executable and the /usr/bin is in your PATH environment variable.

Solution 2

The package name changed in the repository from python-software-properties to python3-software-properties. Install that and all be good!

Solution 3

You need to install software-properties-common instead of python-software-properties. See https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/439566.

Share:
44,498

Related videos on Youtube

aslancz
Author by

aslancz

Updated on September 18, 2022

Comments

  • aslancz
    aslancz over 1 year

    I need to install the last version of node.js but my system has in repository older version. I need to add new ppa source. I followed this tutorial

    Question - when I install "python-software-properties" package:

    sudo apt-get install python-software-properties
    

    program "add-apt-repository" is not installed (nor apt-add-repository):

    root@vm7590:~# add-apt-repository
    The program 'add-apt-repository' is currently not installed.  You can install it by typing:
    apt-get install python-software-properties
    

    and

    root@vm7590:~# apt-add-repository
    The program 'apt-add-repository' is currently not installed.  You can install it by typing:
    apt-get install python-software-properties
    

    but program "python-software-properties" is already installed.

    root@vm7590:~# sudo apt-get install python-software-properties
    sudo: unable to resolve host vm7590
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    python-software-properties is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    What am I doing wrong? Is there some another method hot to add a ppa source?

    My system is as follows:

    root@vm7590:~# uname -a
    Linux vm7590 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    
    • goldilocks
      goldilocks about 11 years
      If you haven't got this worked out yet I'd recommend just removing the distro node.js completely and building from source in /usr/local. I don't think anything will depend on the package being installed as node can manage its own packages anyway.
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' about 11 years
      Please post the output of the following commands: apt-cache policy python-software-properties, ls -l /usr/bin/apt-add-repository, file /usr/bin/apt-add-repository, sudo 'echo "$PATH"'
  • aslancz
    aslancz about 11 years
    Program apt-add-repository doesn't exist in my system (I tried whereis command, and doesn't exist in /usr/bin too), python-software-properties are installed and reinstall didn't help. I really don't know what is wrong.
  • Cloud Cho
    Cloud Cho about 2 years
    Is this for only Python 3.x?