MySQL 5 and MySQL 5.1 installed concurrently
ryandesign at macports.org
Sat Feb 7 11:25:25 PST 2009
On Feb 7, 2009, at 13:02, Michael J. I. Jackson wrote:
> On Feb 6, 2009, at 11:44 PM, Ryan Schmidt wrote:
>> On Feb 6, 2009, at 22:44, Michael J. I. Jackson wrote:
>>> Is it possible to install the mysql5 and mysql5-devel ports
>>> concurrently on the same box? I had 5.0 installed, but then
>>> decided I'd like to try 5.1. So I deactivated the mysql port and
>>> installed mysql-devel. However, it appears that the install
>>> location for 5.1 is exactly the same as 5 so the two cannot
>>> coexist on the same machine.
>>> If someone would please confirm this, that would be great. If you
>>> could tell me how to confirm it for myself so I don't have to
>>> bother you next time, that would be even better. ;)
>> You can have both mysql5 and mysql5-devel installed at the same
>> time, but not active at the same time. The same goes for any other
>> foo/foo-devel port combination.
>> If you have mysql5 installed and would like to try mysql5-devel
>> instead, you would need to
>> sudo port deactivate mysql5
>> sudo port install mysql5-devel +server
>> In this particular case (mysql5 5.0.x and mysql5-devel 5.1.x) you
>> would also need to rebuild any programs (such as php5) that use
>> the mysql library, because the version number of the library has
>> changed. Otherwise you will find that php will complain about not
>> being able to find the (old) mysql5 library. To rebuild php5:
>> sudo port -nf upgrade php5
>> Some ports may not know about mysql5-devel and still try to depend
>> exclusively on mysql5. For example, if you've installed mysql5-
>> devel as above, and then try to install a port that requires
>> mysql5, you'll get an error as it tries to activate mysql5 but
>> can't because mysql5-devel is already active. Usually this is a
>> bug, which should be filed against that port so that the
>> dependency can be rewritten so that either mysql5 or mysql5-devel
>> can be used.
> Is this the case for rb-mysql?
> I have both mysql5 and mysql5-devel installed as you stated above,
> with mysql5-devel active and mysql5 deactivated. When I try and
> install rb-mysql, it immediately fetches mysql5 and starts
> rebuilding it (even though it's already installed, just inactive).
> Looking at the Portfile (http://trac.macports.org/browser/trunk/
> dports/ruby/rb-mysql/Portfile) the only relevant line I can see is
> the following:
> depends_lib port:mysql5
> So I guess there are three questions here: 1) Why would rb-mysql
> start rebuilding mysql5 if it's already been installed?
Because it is not active.
> 2) Should a bug be filed against rb-mysql to modify it so it can
> use mysql5-devel as well?
Yes. "port:mysql5" should be changed to "path:bin/mysql_config5:mysql5".
> 3) What can I do in the mean time to get rb-mysql working with
Make the above change to the portfile locally. To find out where the
file is, run "port file rb-mysql". Note that your change will be
wiped out next time you "port sync".
More information about the macports-users