Trouble with Yum

v7
yum
updates

(quizhead) #1

Hi,

Having some troube with Yum cahce-
Tried to install the VM manager and got the red sign with the massage :

" File contains no section headers. file: file:///etc/yum.repos.d/mssql-server.repo, line: 1 ‘\r\n’

The install/update may have failed due to metadata caching issues. Please clean the cache by clicking the button below and retry the install/update operation."

Tried to press the Clear Yum Cache with no success.
Any ideas ?

Thank you.


(Michael Träumner) #2

Please try to clear it at command line:

yum clean all


(quizhead) #4

Tried it.
The same message appears about “file contains no section headers” both in CMD and GUI


(Michael Kicks) #5

cat /etc/yum.repos.d/mssql-server.repo
At least it will be visible the file which claim to have issues…


(Wellington Rodrigues) #6

I had a problem familiar to your, I could not clear the cache so I used this command

rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa
yum clean all


(Marc) #7

Your repo file starts with a blank line or is missing some content. As said by @pike, look at the file content. You might have to remove the blank line or recreate the file.


(quizhead) #9

How should I do that ? I’m new to linux


(Marc) #10
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo

As per this guide:


(quizhead) #11

but it’s not about the SQLserver.
It happend after I tried to install the VM manager


(Marc) #12

If I’m not wrong, yum checks all the repos to build the cache. The error refers to that repo file so it seems the file could have been corrupted. If you post the content of that file we can see what’s wrong.


(quizhead) #13

2000 - max5

This is the result after perfoming the commmand which was given above


(Marc) #14

The file contents are wrong. It seems when you used curl to download the repo file it failed to find it (maybe a missing letter or something of that sort).
If you are using Microsoft SQL Server, you can recreate it as instructed above.
It should look like:

[packages-microsoft-com-mssql-server-2017]
name=packages-microsoft-com-mssql-server-2017
baseurl=https://packages.microsoft.com/rhel/7/mssql-server-2017/
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

(quizhead) #15

tried to reinstall and the same message appear.
Is there a way to erase the file and reinstall ?


(Markus Neuberger) #16

Delete the file(s):

rm -f /etc/yum.repos.d/mssql-server*.repo

Recreate it:

curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo

(quizhead) #18

A new message appear after this :
rmpdb open failed


(Markus Neuberger) #19

Maybe you need a clean all again…

yum clean all

(quizhead) #23

problem solved

this is what I did :

rm -f /var/lib/rpm/__db
rm -f /etc/yum.repos.d/mssql-server.repo
db_verify /var/lib/rpm/Packages
rpm --rebuilddb
rm -rf /var/cache/yum
clicked the red banner in the GUI
checked SQL status and it’s running so maybe there was a double configuration in some way


(Marc) #24

If you have a use for Microsoft SQL you won’t receive updates for it, as the repoditory file has been deleted.