27

I have 12.10 ubuntu and when I try to remove / install programs I get notification :

Software can't be installed or removed because the authentication service is not available.

(org.freedesktop.PolicyKit.Error.Failed: ('system-bus-name', {'name':  ':1.104'}): org.debian.apt.install-or-remove-packages

When I log in as root user (instead of user account that I regulary use) i have no problems.

Braiam
  • 67,791
  • 32
  • 179
  • 269
grr
  • 271
  • 1
  • 3
  • 3
  • I have a similar bug after upgrade from 13.04 to 13.10 now: org.freedesktop.PolicyKit.Error.Failed: ('system-bus-name', {'name': ':1.44'}): org.debian.apt.install-file (I already checked: Policy kit is in autostart) – rubo77 Nov 05 '13 at 08:06
  • 1
    I got this error when I changed desktop environment, devav2's answer worked for me. – Flimm Dec 10 '13 at 10:45

7 Answers7

27

It seems like the policy kit authentication agent is not started in startup applications program.

Add the below line to startup applications.

 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

Also note that this was already raised as a bug and fixed is provided in software-center - 5.3.9

Update your software center to fix the issue.

Here is the bug details

devav2
  • 36,312
5

I had the same problem. It turned out to be because PolicyKit Authentication Agent was unchecked in Startup Programs. I checked it, and the problem was fixed. Hopefully that will take care of it for you as well.

Eliah Kagan
  • 117,780
Zoids
  • 59
4

I feel you can just reinstall the ubuntu software it will get fixed i hav tred it. just type down this command in your terminal it will re-install the software center

sudo apt-get update; sudo apt-get --purge --reinstall install software-center software-properties-common software-properties-gtk

2

Sorry to be reviving this thread, but for those who still encounter this problem running the software center using gksudo fixed it for me and gave the graphical software center the permissions needed.

A.D
  • 121
1

I was able to negate the issue by opening the terminal and typing in the command:

sudo su

And then, in the resulting root shell:

software-center

This opened the Software Center and allowed me to install the software I wanted.

This is also useful if you want to use the Software Center before applying a more permanent solution. It resembles the technique in A.D's answer--in that both use sudo rather than PolicyKit to elevate privileges--but most current Ubuntu releases don't have gksudo.

If you want to do this using a single command and without opening a root shell, this also works:

sudo -H software-center
Eliah Kagan
  • 117,780
Savant
  • 11
1

@Devav and @Zoids are right. There is a similar question on SO here: Authentication error when trying to install or uninstall using Ubuntu Software Center (14.04)

Adding the link, so that it will help others. Apart from adding it to Startup items, you should even run the application, so that the application works for your current session. Hence run the application as sudo /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

Vinod Tigadi
  • 131
  • 2
0

If it can help, I'm using xubuntu 14.04, and I had the same problem. I had policy kit launched at startup but the package policykit-1-gnome was not installed. Once installed it worked !

Franperr
  • 126