LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-31-2020, 07:41 PM   #1
elrodrix
LQ Newbie
 
Registered: May 2015
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 03-31-2020, 07:45 PM   #2
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,776

Rep: Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359Reputation: 1359
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.
 
Old 03-31-2020, 10:43 PM   #3
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 1,910

Rep: Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171Reputation: 6171
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!
 
Old 03-31-2020, 10:52 PM   #4
baumei
Member
 
Registered: Feb 2019
Location: USA; North Carolina
Distribution: Slackware!
Posts: 161

Rep: Reputation: 58
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

Last edited by baumei; 03-31-2020 at 10:54 PM.
 
Old 04-01-2020, 03:54 AM   #5
SavoTU
Member
 
Registered: Apr 2005
Distribution: Slackware64 Current
Posts: 193

Rep: Reputation: 40
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.
 
Old 04-03-2020, 08:05 PM   #6
SunnyJim
Member
 
Registered: Jan 2016
Location: Canada
Distribution: slackware and linux mint
Posts: 41

Rep: Reputation: Disabled
rm -fr the nuclear option. Yeah a new reinstall and regular back ups always a good idea.
 
Old 04-03-2020, 10:32 PM   #7
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 330

Rep: Reputation: Disabled
Quote:
Originally Posted by SunnyJim View Post
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.

Last edited by gus3; 04-03-2020 at 11:16 PM. Reason: repaired a grammar error
 
  


Reply

Tags
removepkg, slackpkg, upgrade, upgrade failure, upgrade-all


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to log internal-sftp chroot jailed users access log to /var/log/sftp.log file LittleMaster Linux - Server 0 09-04-2018 03:45 PM
[SOLVED] iptables troubleshooting icmp and best place to log /var/log/messages or /var/log/iptables JockVSJock Linux - Security 18 02-12-2016 12:31 AM
[SOLVED] I accidentally removed all contents of /var/log - please send me your /var/log hearthstone Debian 6 12-18-2012 08:09 PM
I accidentally removed all contents of /var/log - please send me your /var/log (OT) syg00 Debian 1 12-16-2012 07:16 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration