[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get purge fails vs ssh -Y for root gfx



 Hi.

On Thu, May 21, 2015 at 06:22:37AM -0400, Gene Heskett wrote:
> Greetings all;
> 
> 2 problems.
> Wheezy or wheezy derived installs on all 3 boxes on my local network, 
> which I am the only user of, and all behind a dd-wrt install on the 
> router, so I am not in the least worried about security related stuff.
> 
> Trying to apt-get purge the repos ancient amanda-common and amanda-client 
> packages from one of my boxes so I can install the correct debs from 
> that zmanda site.
> 
> I have been a week trying to make those ancient versions work with the 
> recommended stable version 3.3.7p1 installs on the other 2 boxes.
> 
> I am looking at the packages sitting in /var/cache/apt/archives, that 
> were installed by synaptic a week ago.
> 
> gene@shop:/var/cache/apt/archives$ ls|grep amanda
> amanda-client_1%3a3.3.1-4_i386.deb
> amanda-common_1%3a3.3.1-4_i386.deb
> 
> but a sudo apt-get purge amanda-common_* amanda-client_*
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> E: Unable to locate package amanda-common_1%3a3.3.1-4_i386.deb
> E: Couldn't find any package by 
> regex 'amanda-common_1%3a3.3.1-4_i386.deb'
> E: Unable to locate package amanda-client_1%3a3.3.1-4_i386.deb
> E: Couldn't find any package by 
> regex 'amanda-client_1%3a3.3.1-4_i386.deb'
> 
> Please tell me apt-get isn't losing its mind...

It does not. It's shell that is giving you this trouble.
Every time you specify something that contains an asterisk, shell
helpfully tries to expand an asterisk to a full list of filenames.
So actually what you're trying to run looks like this:

sudo apt-get purge amanda-common_1%3a3.3.1-4_i386.deb \
 amanda-client_1%3a3.3.1-4_i386.deb

Apt is supposed to work with packages by their names, so it tries to
purge a package that's literally called
'amanda-common_1%3a3.3.1-4_i386.deb'. And fails, since the actual
package is called 'amanda-common'.

A quick and dirty way to fix it is (note the absence of underscore):

cd /; sudo apt-get purge amanda-common* amanda-client*

A correct (but boring) way to fix it is:

sudo apt-get purge 'amanda-common*' 'amanda-client*'


> I am currently "ssh -Y" into that box, and one of the display managers or 
> X is refusing to forward the graphics for an application that must run 
> as root, and the usual fixes are NOT working.

'apt-get install xauth' on target host solves it for me usually.


> So, how do I fix this:
> gene@shop:/var/cache/apt/archives$ sudo synaptic
> X11 connection rejected because of wrong authentication.
> 
> (synaptic:14317): Gtk-WARNING **: cannot open display: localhost:11.0
> 
> graphical applications that do not run as root, work fine.
> 
> Thanks for any help on this latter problem.

'sudo -E synaptic' should do the trick. Although it seems unnessessary
to run synaptic as root as it should rely on PolicyKit to escalate
privileges to root if it needs so.

Reco


Reply to: