Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using Macports 1.7.1, and I don't want the latest port version, since it does not play nice with some other packages I want to build from source.

How can I force a particular version of a package installed from within macports "port" tool?

share|improve this question
2  
You might consider accepting an answer (it'll help your acceptance rate and give points to whomever you choose). –  Nerdling Sep 13 '09 at 2:17

3 Answers 3

up vote 7 down vote accepted

The old version of your software is likely still around. Check this by running:

port installed PACKAGE

where PACKAGE is what you want to downgrade. This will list out the "fully-qualified" name of the ports that match. You'll see the active port and the old, inactive port. You can switch them by doing something akin to this procedure:

port deactivate PACKAGE@CURRENT_REVISION+VARIANTS

port activate PACKAKGE@OLD_REVISION+VARIANTS

share|improve this answer
    
+1 . Simple and effective - especially when the desire is to downgrade to a recently updated port. –  DaveParillo Aug 14 '13 at 4:10

I don't think you can use an older version in MacPorts. The build list is maintained, and doesn't seem to contain many previous versions with the exception of a few packages such as mysql. So, if you do port search package, the results it shows is all it can do. In mysql's case, I can see there are mysql5, 4, and 3. If I wanted 4, I'd just do sudo port install mysql4.

If your package isn't listed, you might have to build from scratch.

share|improve this answer
    
The other answers provided options … it is doable. –  Nerdling Nov 13 '09 at 21:01

You can create an additional local portfile repository to override some packages. I use this to force MacPorts to use an older version of the 'screen' package (there is an open bug issue with newer versions).

The MacPorts guide has the details about how to configure this: http://guide.macports.org/#development.local-repositories

share|improve this answer
    
Furthering the idea, you can then grab the version of the Portfile you want and drop it in giving you back the old version. –  Nerdling Aug 26 '09 at 12:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.