zypper cannot find all packages

using zypper it cannot find all packages in my repository

I have tried to delete /etc/zypp, and recreate the repositories again. Still same problem persist.

machine1:~ # zypper install --force gcc49
Loading repository data…
Reading installed packages…
Package gcc49-4.9.2-2companyBuild.x86_64 not found in repositories, cannot reinstall.

However if I enter into YaST => Software Management, I am able to find the package under this repository, and able to forcefully reinstall it.
How come zypper cannot find the package?

Using SUSE Linux Enterprise Server 11. I know it is very old, but I have no where else to ask. Not sure where to look for discrepancies on the system.
I have tried to clean with zypper clean -all and rpmdb --rebuilddb. I tried these commands on one server and it worked there, but only there. Other servers still have the problem with zypper cannot find the package.

This works fine on SLES 11 SP3, but fails on SLES 11. I know SP3 has zypper 1.6.326, while SLES 11 has version 1.0.13.

The repository is comprized of two symlinks
/repo/sles11/dir1 => /dir1
/repo/sles11/dir2 => /dir2
It finds the packages from dir2, but not dir1. The access is the same on each symlink and underlying directories. The repodata/filelist.xml.gz contains all the packages from both these directories. Still zypper cannot find all, but YaST does.

Is there any manual procedures I can try to clean out everything (short of doing a reinstall) ?

Is this SLES or openSUSE? this is openSUSE forum not SLES forum

SUSE forums for SLES and SLED are at: https://forums.suse.com/forum.php

Same username/password as here.

The cache and the repo probably aren’t in sync. Run


zypper clean && zypper ref

and try again.

Thanks for that. Didn’t know there was a SUSE forum.

Tried, but with no effect.

rpmdb --rebuilddb
zypper clean --all
zypper ref --force