Solaris: How to de-register/de-list a package installed with pkgadd - package

We have uninstalled an application on several Solaris servers manually by deleting folders and files only to realize afterwards that it had been installed with a package through pkgadd.
The command pkginfo -l, still shows the package even though its files are gone. Is there a way to simply "de-register" the package so it doesn't show up anymore with pkginfo?

As well as /var/sadm/pkg you should also check /var/sadm/install/contents, and the man page contents(4) for the same (man -s4 contents).

Related

How to manually install packages for MikTex

I am using MikTex 2.9 and Texmaker. I need to download packages, such as the sespace package, manually from https://ctan.org/. I have done that and placed the resulting folder in: C:\Users\User1\AppData\Local\Programs\MiKTeX 2.9\tex\latex
Other previously installed packages are in that location and are recognised by MikTex as present.
The setspace folder contains setspace.sty and two test files. However when I compile in Texmaker it doesn't recognise that the package is present, and wants to download it.
Does the .sty file need to go somewhere specific, and how do I find out where that might be, please?

In OpenBSD how to upgrade individual system files like (grep, rcs, rlog ) to latest version?

I am attempting to run foswiki on OpenBSD. Things are installed and i am able to open "/bin/Configure" page of foswiki configuration screen. but the page reports few errors, complaining that following files are either not found or outdated and new versions are required.
The Files are : grep, rcs, ci, co,rlog, rcsdiff
I tried commands like "pkg_add -Uu" to upgrade packages installed, but it reports all packages are uptodate.
I also tried "pkg_add rcs" "pkg_add grep" etc but non works.
So my basic question is how to I update above files to their latest version required by foswiki.
Regards
While I’m not familiar with Foswiki, my first thought is your web server is chrooted, as this is the default on OpenBSD, and, as a result, Foswiki cannot find the files it needs. You can copy the files Foswiki needs into the chroot or run the web server without chroot, which is bad from a security perspective.
all programs mentioned are part of a base openbsd install and the above answer is correct. the openbsd documentation on chrooted apache has more info.
if you don't have to stick with foswiki you can try dokuwiki instead which has package support on openbsd and installs easily in very much the same way you tried already:
sudo pkg_add -U dokuwiki
hope the process is pretty much self-descriptive. in addition, the manpage for pkg_add is a good thing to read. good luck!

Install Packages (for dummies)

I know there's a lot of information on here about installing python packages, but I'm quite new to python and I think I need a more "for dummies" level of help.
I was trying to install openpyxl for which as far as I can tell I need easy_install, for which, as far as I can tell, I need setuptools. I tried running the code provided here https://pypi.python.org/pypi/setuptools which is supposed to download and install setuptools (and according to some sites, easy_install aswell?) - it runs successfully, but help(modules) doesn't show setuptools or easy_install as modules, I have no idea whats installed and what isn't, or how I'm supposed to install any of it!
Essentially I'm very confused, very frustrated and really need someone to talk me through (in idiot-speak) what I'm supposed to do.
Thankyou!
We all start somewhere, I was there two weeks ago.
I'll assume you're using Python2. I believe Distribute and Pip are recommended for Python3 (which I will be using as examples). I will also assume you are on Windows.
First, python needs to be registered to Path. To check if this has been done automatically, open a command prompt (start -> programs -> accessories), and type 'python', then enter. If it returns the version number, etc, skip down a bit. If it throws an error, you need to add Python to Path.
Adding Python to Path
To add Python to Path on a Windows computer, go to:
Control Panel -> System -> Advanced Settings -> Environment Settings -> System Variables
Scroll down to select path, then click edit. Copy the entire line to a text document, and add your install directory for Python.exe (and the scripts folder) using ';' as a delimiter between different directories. Copy this back to Path and save. (Additionally close your command prompt window to reset it.)
For my Windows 7 machine, I added:
;C:\Python33;C:\Python33\scripts;
Take care when editing this file. There are many videos out there describing this in detail if you feel unsure about changing this.
Installing Modules (Such as setup_tools)
Once Python is registered in the Path file, download and unzip setup_tools to a folder within your Python install directory called 'modules'. I use ExtractNow to unzip, as it will unzip twice (as required) automatically.
Open a command prompt window again, and direct it to change directories by typing
cd [directory for module you want to install]
On my computer, this would be
cd C:\Python33\modules\distribute-0.6.40
Again, I use distribute, rather than setup_tools as it sounds like you need would for Python2. Simply use the appropriate directory. Press enter to change the directory.
Once you've entered this and it shows a changed directory, type:
python setup.py install
This indicates that you want to use the program python to use the setup.py file in the specified folder to install the module. This should be successful, and will write many lines of code.
If you want to install other modules, you would install them in a similar way. Python would automatically use setup_tools on your computer to finish each install.
Remember to import at the start of your script when using them to code:
import [module]
Happy Programming!

Solaris pkgadd ignores dependencies

I have a Solaris package with depend file. When I install the package, it ignores the dependencies.
My depend file looks like this:
P SUNWcsu Core Solaris, (Usr)
P XXCore My core package
I am able to install the package even if XXCore is not installed.
My Prototype looks like this:
i pkginfo
i depend
i request
Thanks in advance.
BTW, other install files (request, checkinstall, etc) are handled correctly.
UPDATE:
I have made some changes to the depend file so it looks like one that works fine. I only changed Tab to white space. Now it behaves differently - I get the following:
Verifying package dependencies.
WARNING:
The XXCore package "My core package" is a
prerequisite package and should be installed.
Do you want to continue with the installation?
It is better, but I want the installation to stop, without the option to continue
Should you want to enforce a prerequisite, you can prevent the package installation by using a checkinstall or preinstall script that check for required the package presence and exit in error if not.

Trying to install MacPorts

I've followed the directions in Installing MacPorts.
To install MacPorts using the pkg installer. The installation apparently goes fine. For example, it goes through the multi-step process eventually saying "Installation Successful" or something to this effect.
And now there's just the "little" problem that neither of these commands work:
man ports
which ports
I've checked in /usr/local, /bin, and /usr/bin, and I don't see where this has been installed to. Ideas?
They're in /opt/local/bin, so as to not overwrite stuff that came with Mac OS X or that you might have gotten from elsewhere. They won't be in your $PATH until you close that Terminal and open another (nothing can alter the environment of a running program except the program itself).
It's in /opt/local/bin. MacPorts updates .bash_profile to include this in the path, but obviously existing shells don't see the updated PATH variable...
It's probably because you're trying ports but the command is called port: See http://guide.macports.org/#using.port

Resources