zypper errors about a file not containing public key data?

When I try to use zypper, this is what happens:

> zypper in shutter

Error building the cache:
File /var/tmp/TmpFile.uo7BMh doesn’t contain public key data
Warning: Disabling repository ‘openSUSE111_OSS’ because of the above error.

Now the file /var/tmp/TmpFile.uo7BMh doesn’t even exist on my system. What’s going on here, and how do I fix it?

Thanks,
Al (AussieGuy)

AussieGuy wrote:
>
> When I try to use zypper, this is what happens:
>
>> zypper in shutter
>
> Error building the cache:
> File /var/tmp/TmpFile.uo7BMh doesn’t contain public key data
> Warning: Disabling repository ‘openSUSE111_OSS’ because of the above
> error.
>
> Now the file /var/tmp/TmpFile.uo7BMh doesn’t even exist on my system.
> What’s going on here, and how do I fix it?

Refresh the named repository: “zypper ref openSUSE111_OSS” and try again.
Also try “zypper ref --force openSUSE111_OSS”.

Kind regards,
Andreas Stieger

Sorry to be so late in replying - just got back from leave. I’ve tried those, and still get a message complaining about lack of public key data.

-Al

This might be a bit severe, but try deleting (as root) offending repo data from /var/cache/zypp/raw/ directory. (I’ve had to do this in the past).

rm -r /var/cache/zypp/raw/<name of repo dir>

Then do

zypper ref

See how that goes.

Just tried that too - still the same public key error. I guess what I need to do is to somehow eliminate all of zypper and its directories from my system, and reinstall it. Can this be done without wrecking the information zypper would need about my system?

Try deleting the repo via YaST, then add it back in again.

I’ve tried that; YaST gives me the error message:

“There were errors while restoring the repository configuration.
Parse error”

I’m mystified and stumped…

I’m mystified and stumped…

Me too…

Maybe this is worth a go

zypper clean -a
zypper ref

FWIW, the actual repo configurations are stored in /etc/zypp/repos.d directory.

For reference, on my openSUSE 11 system, I have

linux:/home/dean # cat /etc/zypp/repos.d/repo-non-oss.repo
[repo-non-oss]
name=openSUSE-11.0-Non-Oss
baseurl=http://download.opensuse.org/distribution/11.0/repo/non-oss/
path=/
type=yast2
enabled=1
autorefresh=1
gpgcheck=1
keeppackages=0

Maybe it will pay to have a look at the relevant config file on your system and compare against the oss repo url for example.

Thanks, I’ve tried those; nothing. Every attempt to use zypper results in these annoying messages:

“Retrieving repository ‘openSUSE111_NonOSS’ metadata [error]
Repository ‘openSUSE111_NonOSS’ is invalid.
File /var/tmp/TmpFile.KkfwW9 doesn’t contain public key data
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository ‘openSUSE111_NonOSS’ because of the above error.”

and similarly for all other respositories - of which I’m sure the URIs are valid. I’ve got no idea where this filename /var/tmp/TmpFile.KkfwW9 is coming from; this file doesn’t exist, and anyway seems to be randomly generated when zypper is used.

File /var/tmp/TmpFile.KkfwW9 doesn’t contain public key data

I can only guess as to what is wrong here. I wonder if its worth ditching all the gpg public keys first

Try

rpm -qa | grep gpg-pubkey | xargs rpm -e

Then see if zypper behaves

zypper ref

(If keys are required, they will be asked for again)

  1. More drastically, if this still doesn’t work, at this point, I think you’ve got nothing to lose by reinstalling zypper from install disk or similar.

I’m out of ideas…but watching with interest. Any gurus around?

Well, I think the problem is not the keys:


"Retrieving repository 'openSUSE111_NonOSS' metadata [error]
**Repository 'openSUSE111_NonOSS' is invalid.**

Not finding the keys is only the “follow up” error, obviously the repo is not set up correctly.

@AussieGuy: Can you post all your repos

zypper lr -u

I deleted all my repositories (with zypper rr), and tried to add one back in using:

zypper ar Index of /distribution/11.1/repo/oss openSUSE111_OSS

Then

zypper ref

gave me the same public key error as before. So at this point, zypper lr -u returns

| Alias | Name | Enabled | Refresh | URI

–±----------------±----------------±--------±--------±--------------------------------------------------------
1 | openSUSE111_OSS | openSUSE111_OSS | Yes | No | Index of /distribution/11.1/repo/oss

I guess I could try to remove all the public keys. I did in fact investigate removing zypper using YaST, but didn’t, because apparently so many things rely on it.

Hi,

You could try going to YaST -> Software -> Software Repositories

then clicking on the problem repository and clicking on ‘edit’, then if you just add a forward slash ‘/’ at the end of the ‘directory on server’ and click on ‘OK’, and the keys will be refreshed for it.

Good Luck,
Barry.

Trouble is, when I use YaST, first I get an error message:

“There were errors while restoring the repository configuration.
Parse error”

and then there are no repositories listed - just the repository names under Services.

Hmm, might be a problem in my /etc/YaST2/control.xml file; one line says:

<external_sources_link>http://download.opensuse.org/YaST/Repos/openSUSE_111_Servers.xml</external_sources_link>

but the link is not actually valid. So what should go here?

Looks ok to me. (Have a look at this thread for reference).

I have the same problem here, and every attemt to add repos fail. Have even installed zypper from dvd with the same result. >:(

Same error to me, found that was a non working proxy …