3

I am using Fedora 17 and I cannot install packages using yum. I get this error:

[root@cousinot ~]# yum install fedup
Loaded plugins: langpacks, presto, refresh-packagekit
medInria                                                 |  951 B     00:00     
medInria/primary                                           | 3.6 kB   00:00     
medInria                                                                    3/3
No package fedup available.
Error: Nothing to do

And I get the same error with all packages. In the /etc/yum.repos.d/ I have:

[root@cousinot yum.repos.d]# ls
fedora.repo                  rpmfusion-free-updates-testing.repo
fedora-updates.repo          rpmfusion-nonfree-rawhide.repo
fedora-updates-testing.repo  rpmfusion-nonfree.repo
medInria.repo                rpmfusion-nonfree-updates.repo
rpmfusion-free-rawhide.repo  rpmfusion-nonfree-updates-testing.repo
rpmfusion-free.repo          yumconf-sop
rpmfusion-free-updates.repo

But: vim fedora.repo shows an empty file. fedora-updates.repo and fedora-updates-testing.repo are also empty.

I tried yum update: it gives No packages marked for update.

I tried to reinstall Fedora 17 to get the repo files back. Both rpm -Uvh with --oldpackage or --replacepkgs did not work (it gives: package fedora-release-17-2.noarch is already installed). But yum reinstall reinstalled it successfully.

However, even after reinstallation, the repo files are still empty and I can still not install packages using yum (same error as before with fedup, see above).

What can I do? For example, could I just copy-paste in these files what should be written? Many thanks again for your help...

  • Did you try yum update? – shivams May 8 '15 at 5:48
  • Yes, I get "No packages marked for update." And it does not change anything. – Nina May 8 '15 at 6:35
1

Grab the fedora-release package from any mirror and reinstall it. That should get your repo files back.

For example

rpm -Uvh https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/i386/os/Packages/f/fedora-release-17-1.noarch.rpm

You would just need to know which version of Fedora you have to get the right repo.

  • Many thanks for your answer. As I have x86_64, I run this but I got this error: [root@cousinot ~]# rpm -Uvh https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/x86_64/os/Packages/f/fedora-release-17-1.noarch.rpm Retrieving https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/x86_64/os/Packages/f/fedora-release-17-1.noarch.rpm Preparing... ########################################### [100%] package fedora-release-17-2.noarch (which is newer than fedora-release-17-1.noarch) is already installed – Nina May 7 '15 at 22:52
  • @Nina I think adding --oldpackage will allow that to continue. You could also use yum reinstall instead of rpm -Uvh — the direct URL should work even if the repos are corrupted. – mattdm May 8 '15 at 16:28
  • Many thanks for you answer. Yes, I have tried --oldpackage and also --replacepkgs but it did not change anything. While running them, I still get: package fedora-release-17-2.noarch is already installed. However, yum reinstall reinstalled it (thank you). But the repo files are still corrupted (read: empty) and I still cannot run yum install fedup, which was my first purpose. What can I do? many thanks again. – Nina May 8 '15 at 17:42
  • It may be that it wont install because it was older. Try this reinstall: ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/… – Raymond Bannan May 9 '15 at 3:18
  • or even just "yum reinstall fedora-release" – Raymond Bannan May 9 '15 at 3:20
0

Another way I'm thinking that might work comes from http://fedoraforum.org/forum/showthread.php?t=271496

Wherein the solution suggested was to manually update fedora.repo with

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

Worth a shot right? With the variables for version maybe that would work, then again I think version 17's pretty old.

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.