LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Install pkgtools (https://www.linuxquestions.org/questions/slackware-14/install-pkgtools-4175672268/)

Dober 03-31-2020 05:34 AM

Install pkgtools
 
While upgrading packages, removed pkgtools.

Is there a way to install subj?

allend 03-31-2020 05:57 AM

Hmmm Maybe the install media has that.

Dober 03-31-2020 06:05 AM

I have file pkgtools-15.0-noarch-30.txz, but I can't call installpkg: Command not found

ehartman 03-31-2020 06:08 AM

Quote:

Originally Posted by Dober (Post 6106185)
While upgrading packages, removed pkgtools.

Is there a way to install subj?

The short and dirty way:
Code:

1. Download the right version of pkgtools from some mirror:
  pkgtools-14.2-noarch-10.txz  (for 14.2, obviously) or
  pkgtools-15.0-noarch-31.txz  (for -current, updated today)!!
2. Become root and go to the / directory
3. tar xaf <that pkgtools file>
(do not forget the directory in front of the filename)

This will leave an extra 'install' directory in the root, which you can remove with
4. rm -rf /install

Now you've got an "installpkg" script again, so now you can really install it with
5. installpkg <that pkgtools file>
which will actually not do much, but it will create the pkgtools entries in the installed packages and scripts dirs.

Dober 03-31-2020 06:23 AM

ehartman, thanks! You saved me! :-D

allend 03-31-2020 07:24 AM

A more accepted solution would be to boot from the install media, follow the instructions in the paragraph starting with "In a pinch..", chroot to the crippled install and then run pkgtools from the install media.

bassmadrigal 03-31-2020 10:57 AM

ehartman's suggestion works great if you don't want to reboot. allend's suggestion would have you boot off the install media, which will put you to a mini Slackware install that will have pkgtools available. However, I don't think you'd be able to chroot, because then you'd be in your crippled install without pkgtools. Instead, you'd mount your root partition and run installpkg --root /location/to/mounted/root/partition /location/to/pkgtools-*.t?z to install it to a somewhere other than your current root.


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