9

By the error I can't install any packages. And also I can't update to the latest version. I don't know what to do now. Any help much appreciated.

Error: requested datatype primary not available

OS Info

  • Operating System: Fedora 18
  • Architecture: X86_64

From the internet I've tried the following commands to rebuild the repository. But I'm still getting the same error.

Commands run

# yum clean all
# rpm rebuilddb
# yum grouplist or yum list

More Info

The following are my Repo files:

adobe-linux-x86_64.repo
epel.repo
fedora.repo
fedora-updates.repo
fedora-updates-testing.repo
livna.repo
mysql-community.repo
mysql-community-source.repo
pgdg-92-fedora.repo
rpmfusion-free-rawhide.repo
rpmfusion-free.repo
rpmfusion-free-updates.repo
rpmfusion-free-updates-testing.repo
rpmfusion-nonfree-rawhide.repo
rpmfusion-nonfree.repo
rpmfusion-nonfree-updates.repo
rpmfusion-nonfree-updates-testing.repo

3 Answers 3

13

Clean the cache

For starters I would clean up my cache area.

$ sudo yum clean all

Testing each repo

If that doesn't resolve the issue then I would go through and attempt to disable each repository 1 at a time and then re-run the yum list command to see if that resolves your issue.

You can do this via the command line temporarily, but first you need to get the actual names of the repositories, the names of the files are not necessarily the same thing.

Here I'm using Fedora 19, for example:

$ yum repolist | expand
Loaded plugins: auto-update-debuginfo, changelog, langpacks, refresh-packagekit
repo id                                       repo name                   status
fedora/19/x86_64                              Fedora 19 - x86_64          36,253
fedora-debuginfo/19/x86_64                    Fedora 19 - x86_64 - Debug   6,635
google-chrome                                 google-chrome                    3
rpm-sphere                                    RPM Sphere                   7,679
rpmfusion-free/19/x86_64                      RPM Fusion for Fedora 19 -     462
rpmfusion-free-debuginfo/19/x86_64            RPM Fusion for Fedora 19 -     157
rpmfusion-free-updates/19/x86_64              RPM Fusion for Fedora 19 -     414
rpmfusion-free-updates-debuginfo/19/x86_64    RPM Fusion for Fedora 19 -     149
rpmfusion-nonfree/19/x86_64                   RPM Fusion for Fedora 19 -     219
rpmfusion-nonfree-debuginfo/19/x86_64         RPM Fusion for Fedora 19 -      62
rpmfusion-nonfree-updates/19/x86_64           RPM Fusion for Fedora 19 -     497
rpmfusion-nonfree-updates-debuginfo/19/x86_64 RPM Fusion for Fedora 19 -     170
*updates/19/x86_64                            Fedora 19 - x86_64 - Update 17,597
*updates-debuginfo/19/x86_64                  Fedora 19 - x86_64 - Update  2,241
virtualbox/19/x86_64                          Fedora 19 - x86_64 - Virtua     10
repolist: 72,548

Enabling one repo at a time

So I can see the names of my repos in the very first column. Next you'll want to do `yum list where you disable everything and then enable just one repo, to confirm that it's working right.

$ yum --disablerepo=* --enablerepo=google-chrome list available
Loaded plugins: auto-update-debuginfo, changelog, langpacks, refresh-packagekit
Available Packages
google-chrome-beta.x86_64                                                                               33.0.1750.91-1            

When you get to the repo that's causing an issue you should get that same error you mentioned in your post.

3
  • Thanks for the Troubleshoot tips. I followed the instructions. And end up with following interesting facts. FACT 1 --- I am getting the same error with this command yum repolist | expand FACT 2 --- Then I checked each repo by enabling it individually. epel repo is producing the error which we are talking about. And One more interesting factor is getting another error like "Error getting repository data for ------, repository not found". Those repo's are fedora-updates, fedora-updates-testing, mysql-community-source, mysql-community, pgdg-92-fedora.
    – ArunRaj
    Feb 13, 2014 at 7:57
  • 1
    @user2959196 - You can also go into the .repo files and change the enabled=1 to enabled=0 as well.
    – slm
    Feb 13, 2014 at 8:04
  • 1
    In my case, running yum --disablerepo=* --enablerepo=repo_name update for each individual repo, solved the issue anyhow. I was getting Error: requested datatype filelists not available before. Nov 29, 2017 at 5:48
6

I was experiencing the same Error: requested datatype filelists not available issue. I followed @slm process above to narrow down which .repo file was causing the issue, but now which individual repo?

I turned enable=1 on all individual repos within the .repo file to 0 and then tested the list command after enabling each individual repo. Eventually I found the individual repo causing the issue.

We host repository cache with Artifactory... but even with externally hosted repos, if you can browse the repos (like http://mirror.centos.org/centos/7.5.1804/os/x86_64/repodata/) you'll see the filelist.xml.gz, this is the missing file the error is talking about.

For Artifactory, I found: https://www.jfrog.com/confluence/display/RTF/RPM+Repositories

Indexing the File List 
The filelists.xml metadata file of an RPM repository contains a list of all
the files in each package hosted in the repository. When the repository
contains many packages, reindexing this file as a result of interactions
with the YUM client can be resource intensive causing a degradation of
performance. Therefore, from version 5.4, reindexing this file is initially
disabled when an RPM repository is created. To enable indexing
filelists.xml, set the Enable File List Indexing checkbox.

So I was able to navigate to the Admin -> local -> "repo" and check the box to create the filelist.

After this, I cleaned cache:

$ yum clean all

$ rm -rf /var/cache/yum

and reran

$ yum list iostat

and it resolved my issue.

0

In my case, it was raising this error when run "yum update" due to a local reporsitory that I've manually added to the /etc/yum.repo.d directory.

I created a myrepo.repo file, and in the "baseurl" I put twice "http://", I mean:

baseurl = http://http://isblcncldrp0001.scisb.isban.corp:8900/cm/5/

So as you can see, the baseurl is wrong. I removed the extra "http://" and "yum update" ran with success.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.