1

The OS of my machine is Oracle Linux Server 7.5.

I need to install a command via a repository, precisely yum --enablerepo=packages-microsoft-com-prod install mdatp, but I get errors like:

libatomic-4.8.5-44.el7.x86_64: [Errno 256] No more mirrors to try.
libnetfilter_queue-1.0.2-2.el7_2.x86_64: [Errno 256] No more mirrors to try.

I used the command yum repolist and it reported this to me:

Repository 'ol7_software_collections': Error parsing config: Error parsing "baseurl = 'file:///run/media/root/OL7.5 Server.src/'": URL must be http, ftp, file or https not ""

I went on /etc/yum.repos.d/ and I found:

  • media.repo
  • prod.repo
  • public-yum-ol7.repo
  • public-yum-ol7.repoold

I opened the file public-yum-ol7.repo

[ol7_software_collections]
name=OracleLinux7
baseurl=file:///run/media/root/OL7.5 Server.src/
gpgcheck=0
enabled=1

I can't find the error, where am I wrong?

2 Answers 2

1

That error likely results from the whitespace in the path to the repo; quote it in some way:

  • With a backslash: baseurl=file:///run/media/root/OL7.5\ Server.src

or

  • with a "%20": baseurl=file:///run/media/root/OL7.5%20Server.src

or

  • with single quotes: baseurl='file:///run/media/root/OL7.5 Server.src'

or

  • with double quotes: baseurl="file:///run/media/root/OL7.5 Server.src"

The URL value is parsed with the urlparse python library here: https://github.com/rpm-software-management/yum/blob/master/yum/config.py#L230 and if that fails, it prints the "URL must be %s not "%s" error string.

The book Red Hat Enterprise Linux 7: Desktops and Administration also mentions the single-quotes or backslash methods:

Enclose the entire reference in single quotes so that the empty space after the RHEL-7.3 can be read, or place a backslash before the space.

An older reference, with answers from 2008, is the How to write a the baseurl of a path that has spaces page, which mentions:

  • baseurl=file:///media/Fedora%208%20i386%20DVD/Packages
  • baseurl=file:///media/Fedora\ 8\ i386\ DVD/Packages
  • baseurl="file:///media/Fedora 8 i386 DVD/Packages"

(although those attempts appear to have failed for that OP)

3
  • Thank you so much! I answer you in my next post that unfortunately I was not able to solve the problem :(
    – Kanuc
    Dec 3, 2021 at 11:54
  • I saw your comment, thank you. I try to fix the repositories!
    – Kanuc
    Dec 3, 2021 at 14:17
  • Hi Jeff Schaller, at the end I followed this guide -> access.redhat.com/solutions/1355683 and I resolved! Thanks for your help!
    – Kanuc
    Dec 17, 2021 at 9:57
0

It is having trouble parsing baseurl because there is a space in the path between OL7.5 and Server.src.

Try putting it in quotes like this:

baseurl="file:///run/media/root/OL7.5 Server.src/"

Or using %20 in place of the space like this:

baseurl=file:///run/media/root/OL7.5%20Server.src/

1
  • Thank you so much! I answer you in my next post that unfortunately I was not able to solve the problem :(
    – Kanuc
    Dec 3, 2021 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .