![]() |
Where did the "gettext" program get installed, and is that location in your PATH?
|
Since we last spoke, I've had to reinstall fink. It turned out that I'd brought parts of fink with me from ppc, so I couldn't use fink properly or update it. I had to delete my entire /sw dir. <wince> then reinstall from the fink Intel .dmg. I imagine this will help things in the long run, but currently it has broken quite a few. The latest gettext is not listed in fink, so I can't use it to solve this (yet).
Anyway, gettext is in my PATH (/usr/bin _and_ /sw/bin). However, as I said above, I have reservations about fink currently. Fink Commander's table is way off: it doesn't show me as having python, cvs or svn, for example. It probably says this because they're not installed in /sw, but they are installed on my disk. I think cvs came with the system, and I installed svn from source. Python is in /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python but has an alias from /usr/bin . I can use cvs, svn and python, so I know they're there. I'm starting to understand that fink operates in /sw, while software that comes with the system, and software installed from source, may be elsewhere on the disk. It reduces fink's usefulness, IMHO, if it can't identify software outside /sw. However, at last fink is working. But I'm reluctant to install things via fink just because they don't show up in its table as installed, when I know some software exists on disk which fink isn't showing. |
Fink does not and will likely never recognize arbitrary versions of software from arbitrary other providers that you have installed in arbitrary locations. There's just no way it can keep track of what is where, make sure that dependencies are correct, and that things are configured so that they can work well together. For a quick example, Apple's python is compiled for Aqua graphics whereas fink's is built for x11. Almost all of fink is built for x11, so if a fink package ran a python program intending it to be part of a larger x11 thing, it wouldn't suffice for that program to use aqua graphics.
|
Ah. Thanks for explaining that. It makes it difficult to know what I've lost by deleting /sw, but I expect I'll just have to replace things as I work them out. I still don't understand why installing gettext-0.15 from source didn't update my gettext, but I hope some of these things will make sense in time.
So, does this mean I need to reinstall python from fink, for any python script running on the command-line? |
Well, I've worked out why my newer gettext doesn't show up. fink has installed the older one in /sw/bin, while the newer one is in /usr/bin, since I installed it manually, and /sw/bin is listed before /usr/bin in my PATH.
Since there are a lot of bits of gettext, I'm probably going to have to remove the older ones manually. :( I wondered about putting /usr/bin ahead of /sw/bin in my PATH, but that would disable fink updating my software. <sigh> I wish my shell would look for the most recent executable instead. :( |
OK, finally fixed it. Deleted all the old bits of gettext in /sw/bin. Once I open a new shell, bash finds gettext in /usr/local/bin and:
Code:
Pearl:~ clytie$ gettext --version |
Instead of messing with things that other systems have created, put your own stuff in a different location and add that location to your PATH.
You should install your own things in /usr/local...that's why it's there:) Manually altering fink is a recipe for a small disaster because (as you now know) fink expects its things to be exactly as it set them. Manually altering apple stuff in /usr is a recipe for an even larger disaster, since apple's own software and pretty much every other software producer expects your system components to be approximately as apple sets them. |
The difficulty is, as far as I can tell the PATH is used in order, and /sw/bin is first. I suppose I could create a new location and put that ahead of /sw/bin, or put /usr/local/bin ahead of /sw/bin, but I think that would stop me being able to access newer versions of software installed with fink. As long as there's an older version in the first item listed in my PATH, that will be used. That's what stopped me having access to my new gettext. So I really don't see how I can get around that.
Or have I got this wrong? :S |
Quote:
Instead, start thinking about it in terms of which folder you want to have precedence. If you want Fink stuff to have precedence over the Apple-supplied stuff, then put /sw/bin earlier in the PATH. If you want some other stuff (e.g. in /usr/local) to have precedence over the Fink stuff, put that location earlier in the PATH than /sw/bin It won't stop you having access to Fink software, it will just mean that if there is a program with the same name in a folder that occurs earlier in the PATH, then that one program will be used in preference to other programs of that same name that are in other folders. In particular, if you want some new version of 'gettext' to be used, the first thing you need to do is determine which of the various versions of 'gettext' is currently being used. If it isn't the version that you prefer (the version that you are about to update), then you either change your PATH or (more likely) you just rename the other versions (e.g. to 'gettext_fink' or whatever) so that they won't be used when you invoke 'gettext'. |
The difficult thing is that packages have so many files. gettext, for example, installs a lot of tools. However, I will try renaming things in future. If I'm going to continue both using fink and installing some packages manually, putting either /sw/bin or /usr/local/bin first isn't going to solve my problem. One will give precedence to fink, and the other to my manually-installed software.
I want to continue using fink, because it handles dependencies, and is generally more reliable to use for installing packages. However, I regularly encounter software or versions of software I need which are not listed with fink, so I have to install them manually. So I end up with some software which exists in both locations. :( It is confusing, but I will try the renaming process in future. Thankyou for your help. :) |
| All times are GMT -5. The time now is 10:30 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.