Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install DBD::MySQL on Mac OS X Snow Leopard
01-29-2011, 10:52 AM (This post was last modified: 04-08-2012 11:01 AM by Daz.)
Post: #1
Install DBD::MySQL on Mac OS X Snow Leopard
The best way to manage software dependencies on Mac OS X Snow Leopard (10.6.x) now - in my opinion - is to use homebrew as it takes care of all dependency management for you and also allows an easy upgrade path on libraries and tools. Another bonus is that as it installs everything from source code, compiling perl modules and the like against things installed via homebrew is very simple.

If you've been previously using MacPorts, follow the instructions here, to remove it before continuing.

If you've already got an install of MySQL (binary install - not from macports), you must also remove that before continung. Make sure MySQL is shut down, then follow the instructions here and then here before continuing.

Note: If you're not on Snow Leopard, you CANNOT use homebrew - it's Snow Leopard only.

--- Homebrew ---

To install homebrew, simply make sure you have Xcode installed and follow the instructions the homebrew homepage. But if you can't be bothered to read that, simply run the following command:

Code:
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

This will set-up and install homebrew for you. (Note: it may not work the first time for you due to permissions settings - just run the command that the script tells you to, then run the installer again).

--- MySQL ---

That's homebrew done, now to install MySQL...

Code:
brew install mysql

This will take a while to download and compile all of the packages, but wasn't that easy? Once that's done, let's get MySQL set up:

Code:
mysql_install_db

And now fire it up:

Code:
mysql.server start

If you get problems with the above command you can try the 'mysqld_safe' script - this will automatically start mysql and keep it running for you.

NOTE: If you want MySQL to automatically start at login, type this:

Code:
launchctl load -w /usr/local/Cellar/mysql/5.1.43/com.mysql.mysqld.plist

--- DBD::mysql ---

First, let's set up a user account for DBD::mysql to run its test suite with. Log into MySQL as the root user:

Code:
mysql -u root

Then at the MySQL prompt, create a user with your currently logged in username, mine in this case is 'daz':

Code:
grant all privileges on *.* to 'daz'@'localhost';
flush privileges;
exit

That's our user set up, now to use CPANPLUS (the newer, better alternative to just plain old CPAN) to install our modules:

Code:
sudo cpanp

This will launch the CPANPLUS shell, now first a quick setup option:

Code:
s conf prereqs 1; s save

This will tell CPANPLUS to automatically install dependencies (instead of constantly asking you). Now to install our modules:

Code:
i DBI
i DBD::mysql

This will install both DBI and DBD::mysql, if the tests pass and the modules install ok, you're now good to go! Smile

To exit the CPANPLUS shell:

Code:
q

--- Final Cleanup ---

We've currently got a fairly insecure MySQL instance running on our Mac now, if you want to tighten things up, i'd do the following:

Remove our testing MySQL user account, replace it with a real one (first log into mysql: 'mysql -u root'):

Code:
revoke all privileges on *.* from 'daz'@'localhost';
flush privileges;
grant all privileges on *.* to 'daz'@'localhost' identified by 'MY_PASSWORD';
flush privileges;
exit

Now, put a password on the root MySQL user account:

Code:
mysqladmin -u root password NEW_ROOT_PASSWORD

And we're done.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-16-2011, 08:55 AM (This post was last modified: 10-20-2011 08:21 PM by Daz.)
Post: #2
RE: Install DBD::MySQL on Mac OS X Snow Leopard
thanks
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2011, 08:37 AM (This post was last modified: 09-23-2011 09:02 AM by shinsan.)
Post: #3
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Hi Daz

My operating system is : Mac OSX Snow Leopard 10.6.8

I've been trying to install DBD-mysql for last 2 days however I did manage to install it but when I tried using it I got this error

Code:
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /Library/Perl/5.10.0/darwin-thread-multi-2level/aut
+o/DBD/mysql/mysql.bundle
  Expected in: flat namespace

dyld: Symbol not found: _mysql_init
  Referenced from: /Library/Perl/5.10.0/darwin-thread-multi-2level/aut
+o/DBD/mysql/mysql.bundle
  Expected in: flat namespace

So then I stumbled across this thread and decieded to try your method, I follow your instruction and I manage to get to the mysql installation part, but it seem to always fail for me, here's my a out put:

Code:
comp:~ flyn$ brew install -v mysql
[ 54%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmDocumentationFormatterUsage.cxx.o
[ 55%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmDocumentationSection.cxx.o
[ 55%] [ 55%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmDocumentVariables.cxx.o
Building CXX object Source/CMakeFiles/CMakeLib.dir/cmDynamicLoader.cxx.o
[ 56%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExprLexer.cxx.o
[ 56%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExprParser.cxx.o
[ 56%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExprParserHelper.cxx.o
[ 57%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExportBuildFileGenerator.cxx.o
[ 57%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExportFileGenerator.cxx.o
[ 57%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExportInstallFileGenerator.cxx.o
[ 58%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExtraCodeBlocksGenerator.cxx.o
[ 58%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmExtraEclipseCDT4Generator.cxx.o
[ 58%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmFileTimeComparison.cxx.o
[ 59%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGeneratedFileStream.cxx.o
[ 59%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGeneratorExpression.cxx.o
[ 59%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalGenerator.cxx.o
[ 60%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalUnixMakefileGenerator3.cxx.o
[ 60%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGraphVizWriter.cxx.o
[ 60%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmInstallGenerator.cxx.o
[ 61%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmInstallExportGenerator.cxx.o
[ 61%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmInstallFilesGenerator.cxx.o
[ 61%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmInstallScriptGenerator.cxx.o
[ 62%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmInstallTargetGenerator.cxx.o
[ 62%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmInstallDirectoryGenerator.cxx.o
[ 62%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmListFileCache.cxx.o
[ 63%] Building C object Source/CMakeFiles/CMakeLib.dir/cmListFileLexer.c.o
[ 63%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmLocalGenerator.cxx.o
[ 63%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmLocalUnixMakefileGenerator3.cxx.o
[ 63%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmMakeDepend.cxx.o
[ 64%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmMakefile.cxx.o
[ 64%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmMakefileTargetGenerator.cxx.o
[ 64%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmMakefileExecutableTargetGenerator.cxx.o
[ 65%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmMakefileLibraryTargetGenerator.cxx.o
[ 65%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmMakefileUtilityTargetGenerator.cxx.o
[ 65%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmOrderDirectories.cxx.o
[ 66%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmPolicies.cxx.o
[ 66%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmProcessTools.cxx.o
[ 66%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmProperty.cxx.o
[ 67%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmPropertyDefinition.cxx.o
[ 67%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmPropertyDefinitionMap.cxx.o
[ 67%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmPropertyMap.cxx.o
[ 68%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmScriptGenerator.cxx.o
[ 68%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmSourceFile.cxx.o
[ 68%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmSourceFileLocation.cxx.o
[ 69%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmSourceGroup.cxx.o
[ 69%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmSystemTools.cxx.o
[ 69%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmTarget.cxx.o
[ 70%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmTest.cxx.o
[ 70%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmTestGenerator.cxx.o
[ 70%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmVariableWatch.cxx.o
[ 71%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmVersion.cxx.o
[ 71%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmXMLParser.cxx.o
[ 71%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmXMLSafe.cxx.o
[ 72%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmake.cxx.o
[ 72%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmakewizard.cxx.o
[ 72%] Building C object Source/CMakeFiles/CMakeLib.dir/cm_utf8.c.o
[ 72%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalKdevelopGenerator.cxx.o
[ 73%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmXCodeObject.cxx.o
[ 73%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmXCode21Object.cxx.o
[ 73%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalXCodeGenerator.cxx.o
[ 74%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmLocalXCodeGenerator.cxx.o
Linking CXX static library libCMakeLib.a
[ 74%] Built target CMakeLib
Scanning dependencies of target CPackLib
Scanning dependencies of target cmake
Scanning dependencies of target ccmake
Scanning dependencies of target CTestLib
[ 74%] Building CXX object Source/CMakeFiles/cmake.dir/cmakemain.cxx.o
[ 75%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesBoolWidget.cxx.o
[ 75%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackArchiveGenerator.cxx.o
[ 75%] Building CXX object Source/CMakeFiles/CTestLib.dir/cmCTest.cxx.o
[ 75%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesCacheEntryComposite.cxx.o
[ 75%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesDummyWidget.cxx.o
Linking CXX executable ../bin/cmake
[ 76%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesFilePathWidget.cxx.o
Undefined symbols:
  "_inflateEnd", referenced from:
      _gzip_filter_close in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_read_format_zip_cleanup in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_iso9660_cleanup in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
  "_inflateInit2_", referenced from:
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
  "_deflate", referenced from:
      _archive_write_zip_data in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_write_zip_finish_entry in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _drive_compressor in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _drive_compressor in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_gzclose", referenced from:
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
  "_deflateEnd", referenced from:
      _archive_write_zip_finish_entry in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_compressor_gzip_finish in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _archive_compressor_gzip_finish in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_deflateInit2_", referenced from:
      _archive_write_zip_header in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_compressor_gzip_init in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_gzwrite", referenced from:
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
  "_inflateInit_", referenced from:
      _archive_read_format_iso9660_read_data in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
  "_crc32", referenced from:
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_write_zip_data in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_write_zip_data in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_write_zip_header in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_zip_read_header in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_compressor_gzip_init in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _archive_compressor_gzip_write in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _archive_compressor_gzip_finish in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_gzopen", referenced from:
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
  "_inflateReset", referenced from:
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_iso9660_read_data in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
  "_inflate", referenced from:
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_iso9660_read_data in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [bin/cmake] Error 1
make[1]: *** [Source/CMakeFiles/cmake.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 77%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackComponentGroup.cxx.o
[ 77%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesForm.cxx.o
[ 77%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesLabelWidget.cxx.o
[ 77%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackGeneratorFactory.cxx.o
[ 78%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.cxx.o
[ 78%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackGenerator.cxx.o
[ 78%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesMainForm.cxx.o
[ 79%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackLog.cxx.o
[ 79%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmProcess.cxx.o
[ 79%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesPathWidget.cxx.o
[ 79%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackNSISGenerator.cxx.o
[ 80%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesStringWidget.cxx.o
[ 80%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesWidget.cxx.o
[ 80%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/ccmake.cxx.o
Linking CXX executable ../bin/ccmake
Undefined symbols:
  "_inflateEnd", referenced from:
      _gzip_filter_close in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_read_format_zip_cleanup in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_iso9660_cleanup in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
  "_inflateInit2_", referenced from:
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
  "_deflate", referenced from:
      _archive_write_zip_data in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_write_zip_finish_entry in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _drive_compressor in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _drive_compressor in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_gzclose", referenced from:
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
  "_deflateEnd", referenced from:
      _archive_write_zip_finish_entry in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_compressor_gzip_finish in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _archive_compressor_gzip_finish in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_deflateInit2_", referenced from:
      _archive_write_zip_header in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_compressor_gzip_init in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_gzwrite", referenced from:
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
  "_inflateInit_", referenced from:
      _archive_read_format_iso9660_read_data in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
  "_crc32", referenced from:
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_write_zip_data in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_write_zip_data in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_write_zip_header in libcmlibarchive.a(archive_write_set_format_zip.c.o)
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_zip_read_header in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_compressor_gzip_init in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _archive_compressor_gzip_write in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
      _archive_compressor_gzip_finish in libcmlibarchive.a(archive_write_set_compression_gzip.c.o)
  "_gzopen", referenced from:
      cmGeneratedFileStreamBase::CompressFile(char const*, char const*)in libCMakeLib.a(cmGeneratedFileStream.cxx.o)
  "_inflateReset", referenced from:
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_iso9660_read_data in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
  "_inflate", referenced from:
      _gzip_filter_read in libcmlibarchive.a(archive_read_support_compression_gzip.c.o)
      _archive_read_format_zip_read_data in libcmlibarchive.a(archive_read_support_format_zip.c.o)
      _archive_read_format_iso9660_read_data in libcmlibarchive.a(archive_read_support_format_iso9660.c.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [bin/ccmake] Error 1
make[1]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2
[ 80%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBatchTestHandler.cxx.o
[ 80%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackSTGZGenerator.cxx.o
[ 81%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBuildAndTestHandler.cxx.o
[ 81%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBuildCommand.cxx.o
[ 81%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBuildHandler.cxx.o
[ 82%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestConfigureCommand.cxx.o
[ 83%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTGZGenerator.cxx.o
[ 83%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestConfigureHandler.cxx.o
[ 83%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTarBZip2Generator.cxx.o
[ 83%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTarCompressGenerator.cxx.o
[ 84%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackZIPGenerator.cxx.o
[ 84%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackDebGenerator.cxx.o
[ 84%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackRPMGenerator.cxx.o
[ 84%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestCoverageCommand.cxx.o
[ 85%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackBundleGenerator.cxx.o
[ 86%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestCoverageHandler.cxx.o
[ 86%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackDragNDropGenerator.cxx.o
[ 86%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmParsePHPCoverage.cxx.o
[ 86%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackOSXX11Generator.cxx.o
[ 86%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx.o
[ 87%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackPackageMakerGenerator.cxx.o
[ 88%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestGenericHandler.cxx.o
[ 88%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestHandlerCommand.cxx.o
[ 88%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestLaunch.cxx.o
[ 89%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestMemCheckCommand.cxx.o
[ 89%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestMemCheckHandler.cxx.o
[ 89%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestMultiProcessHandler.cxx.o
Linking CXX static library libCPackLib.a
[ 89%] Built target CPackLib
[ 90%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestReadCustomFilesCommand.cxx.o
[ 90%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestRunScriptCommand.cxx.o
[ 90%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestRunTest.cxx.o
[ 91%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestScriptHandler.cxx.o
[ 91%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestSleepCommand.cxx.o
[ 91%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestStartCommand.cxx.o
[ 92%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestSubmitCommand.cxx.o
[ 92%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestSubmitHandler.cxx.o
[ 92%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestTestCommand.cxx.o
[ 93%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestTestHandler.cxx.o
[ 93%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestUpdateCommand.cxx.o
[ 93%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestUpdateHandler.cxx.o
[ 93%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestUploadCommand.cxx.o
[ 94%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestUploadHandler.cxx.o
[ 94%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestVC.cxx.o
[ 94%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestGlobalVC.cxx.o
[ 95%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestCVS.cxx.o
[ 95%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestSVN.cxx.o
[ 95%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBZR.cxx.o
[ 96%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestGIT.cxx.o
[ 96%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestHG.cxx.o
Linking CXX static library libCTestLib.a
[ 96%] Built target CTestLib
make: *** [all] Error 2
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/cmake.rb#L46
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: c986689da3f6f6b9a61cdd3e41eec31b7dbcd357
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit arrandale
OS X: 10.6.8
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.6
GCC-4.0: build 5494
GCC-4.2: build 5666
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
LD: /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -w -pipe
CXXFLAGS: -O3 -march=core2 -w -pipe
MAKEFLAGS: -j4

Error: Failed executing: make
These existing issues may help you:
    https://github.com/mxcl/homebrew/issues/7293
Otherwise, please report the bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
Find all posts by this user
Quote this message in a reply
09-24-2011, 07:09 AM
Post: #4
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Hmmm, that looks like homebrew is having real issues installing MySQL...

I'm afraid that's a little beyond me - I'd suggest following the instructions on the checklist here:

https://github.com/mxcl/homebrew/wiki/ch...-new-issue

And if that fails to install MySQL cleanly, follow the rest of the info on the rest of the page to file an issue with the homebrew folk - generally they're nice folk to talk to.

Hope you get somewhere with it! Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
10-13-2011, 04:05 PM (This post was last modified: 10-20-2011 08:21 PM by Daz.)
Post: #5
RE: Install DBD::MySQL on Mac OS X Snow Leopard
First, I wanted to thank you for taking the time to write this post. It was a savior for me once before and I'm hoping it can be again.

DBD:MySQL on OS X Lion:

I needed to upgrade my computers to OS X Lion recently. To play it "safe" I decided to start by upgrading my laptop, leaving my iMac alone, because my job requires DBD:MySQL be functioning properly and I wanted at least one working computer. I'm thankful I did because I'm getting new errors with DBD:MySQL on Lion (sigh).

Here's the error message I get:

Quote:install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at (eval 21) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.

Lion apparently comes with a new version of Perl (5.12). I was previously using 5.10 with Snow Leopard, so that's where the DBD was installed. Do I have to install a new version of DBD::MySQL? Can I do that without creating an error with the existing version?

Here are my system paths:

Quote:# perl -V

@INC:
/Library/Perl/5.12/darwin-thread-multi-2level
/Library/Perl/5.12
/Network/Library/Perl/5.12/darwin-thread-multi-2level
/Network/Library/Perl/5.12
/Library/Perl/Updates/5.12.3
/System/Library/Perl/5.12/darwin-thread-multi-2level
/System/Library/Perl/5.12
/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.12

So @INC is looking at Perl v5.1.2. What's odd is when I searched for DBD on my computer this came up:

Quote:# find / -name DBD -print

/System/Library/Perl/Extras/5.10/darwin-thread-multi-2level/auto/DBD
/System/Library/Perl/Extras/5.10/darwin-thread-multi-2level/DBD
/System/Library/Perl/Extras/5.10/darwin-thread-multi-2level/DBI/DBD
/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/DBD
/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/DBD
/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/DBI/DBD

I tried adding use lib("/System/Library/Perl/Extras/5.10/darwin-thread-multi-2level"); to my Perl script, but it still didn't work (same error). I've verified MySQL is running. There's something I'm missing and it's making my head spin. Any help would be much appreciated.

Thanks,
Scott
Find all posts by this user
Quote this message in a reply
10-20-2011, 08:19 PM
Post: #6
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Hi Scott,

Sorry for the slow response, I hadn't meant to take this long to reply. Confused

I haven't had a chance to test this on my system yet (and may not get a chance for a few days as i'm off on holiday tomorrow), but from what i've read regarding upgrading to Lion and Perl, all you should need to do is simply re-install the modules you need. This is quite normal with OS X upgrades as system libraries tend to get moved around/updated between releases.

Simply fire up cpan plus and try re-installing...

Code:
sudo cpanp

then:

Code:
i DBI
i DBD::mysql

Let me know how you get on - if you're still having trouble i'll have a proper look at this when I get back. Smile

Thanks,

Daz
Visit this user's website Find all posts by this user
Quote this message in a reply
10-20-2011, 08:25 PM
Post: #7
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Oh, forgot to say with regards to the Perl version to use, just go with the latest one (5.12) unless you have a real reason to stick with 5.10.

You're going to have to re-install your modules either way by the looks of it...
Visit this user's website Find all posts by this user
Quote this message in a reply
10-21-2011, 05:04 PM (This post was last modified: 10-21-2011 05:05 PM by scottmccracken.)
Post: #8
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Daz,

Thanks so much for your suggestions! I'm learning a bit about Perl as I go but must admit this stuff still confuses me to no end. Everything you mentioned made sense, so I fired up cpan plus and tried reinstalling the modules. Unfortunately I ran into the following error when running i DBI:

Code:
Installing DBI (1.616)
Running [/usr/bin/perl /usr/bin/cpanp-run-perl /Users/username/.cpanplus/5.12.3/build/DBI-1.616/Makefile.PL]...

*** Your LANG environment variable is set to 'en_US.UTF-8'
*** This may cause problems for some perl installations.
*** If you get test failures, please try again with LANG unset.
*** If that then works, please email dbi-dev@perl.org with details
*** including the output of 'perl -V'


*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

Your perl was compiled with gcc (version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)), okay.
Creating test wrappers for DBD::Gofer:

[skip this long part]
.
.
.
Checking if your kit is complete...
Looks good

    I see you're using perl 5.012003 on darwin-thread-multi-2level, okay.
    Remember to actually *read* the README file!
    Use  'make' to build the software (dmake or nmake on Windows).
    Then 'make test' to execute self tests.
    Then 'make install' to install the DBI and then delete this working
    directory before unpacking and building any DBD::* drivers.

Writing Makefile for DBI
[ERROR] MAKE failed: No such file or directory open3: exec of /usr/bin/make failed at /System/Library/Perl/5.12/IPC/Cmd.pm line 1010

[ERROR] Unable to create a new distribution object for 'DBI' -- cannot continue

Error installing 'DBI'
Problem installing one or more modules
*** You can view the complete error buffer by pressing 'p' ***

I honestly can't tell if it's a permissions issue or if I'm missing a makefile? I was hoping it was going to be easy, but I guess that was asking too much. Any further suggestions you have for me would be much appreciated.

Thanks,
Scott
Find all posts by this user
Quote this message in a reply
11-08-2011, 09:26 AM
Post: #9
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Hi Scott,

Are you still having issues with this one? If you are let me know and i'll have a good look at it this week.

Cheers,

Daz
Visit this user's website Find all posts by this user
Quote this message in a reply
11-11-2011, 11:19 PM
Post: #10
RE: Install DBD::MySQL on Mac OS X Snow Leopard
Hi Daz,

Unfortunately, yes. I'm still getting the following errors when trying to reinstall DBI via CPAN plus:

Code:
[ERROR] MAKE failed: No such file or directory open3: exec of /usr/bin/make failed at /System/Library/Perl/5.12/IPC/Cmd.pm line 1010

[ERROR] Unable to create a new distribution object for 'DBI' -- cannot continue

I'm wondering if I need to uninstall, then install the module? Honestly though, I have no clue where to turn next. Any help would be appreciated!

Thanks so much,
Scott
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: