LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   I removed /var/log and can't upgrade (https://www.linuxquestions.org/questions/slackware-14/i-removed-var-log-and-cant-upgrade-4175672317/)

elrodrix 03-31-2020 07:41 PM

I removed /var/log and can't upgrade
 
Hi guys.

For a mistake, I removed /var/log folder , using this command:

Code:

rm -fr /var/log/
and now can't update my Slackware:

Code:

bash-4.3# slackpkg upgrade-all

Checking local integrity... ls: no se puede acceder a '/var/log/packages': No existe el fichero o el directorio
ls: no se puede acceder a '/var/log/packages': No existe el fichero o el directorio
DONE
ls: no se puede acceder a '/var/log/packages/*': No existe el fichero o el directorio
Looking for packages to upgrade. Please wait... DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall

Any suggestion to fix this issue?.

Thanks in advance.

montagdude 03-31-2020 07:45 PM

If your Slackware happens to be a full, clean, and up-to-date install, you could recreate the contents of that directory from another full, clean, and up-to-date install. Otherwise, my recommendation is to back up all your files and reinstall.

volkerdi 03-31-2020 10:43 PM

Might be a good time to make some backups if you don't already have them.

I'd probably just installpkg all the packages again which will fix up your missing package data in /var/log/. If you are running 14.2, probably best to do this using the originally released packages, and then let slackpkg update it for you. Good luck!

baumei 03-31-2020 10:52 PM

If a lame /var/log is acceptable to you, then for Slackware 14.2 you could run as root
Code:

mkdir /var/log
cd /var/log/
mkdir ConsoleKit cups iptraf-ng packages removed_packages
mkdir removed_scripts sa samba scripts setup uucp
chmod -R 755 /var/log
reboot ; exit


SavoTU 04-01-2020 03:54 AM

A while back having backed up /var/log/removed_packages I then deleted /var/log/packages. From my experience if this a new ish clean install then just reinstall all packages and you should be good. If not then I would back up and start again.

The problems you will have if not are not huge but as time passes and you forget about the fudge you can spend a good while working out why you cant upgrade a package you have been using because slackpackage is telling you it is not installed. Occasionally you will have the odd problem with deps as you reinstall them forgetting that slackpackage has a blind spot (some years in the past now) and old files have not been cleaned out.

Having been through this I would probably opt to reinstall as in the long run it will waste less time and cause less headaches.

SunnyJim 04-03-2020 08:05 PM

rm -fr the nuclear option. Yeah a new reinstall and regular back ups always a good idea.

gus3 04-03-2020 10:32 PM

Quote:

Originally Posted by SunnyJim (Post 6107602)
rm -fr the nuclear option. Yeah a new reinstall and regular back ups always a good idea.

Only after un-mounting /home (or having an external backup, which isn't mounted).

But also have a backup of /etc. That's where the overall system configuration is, especially users, groups, and their associated privileges.


All times are GMT -5. The time now is 08:36 PM.