If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message because it can’t find the correct libraries.
ld: library not found for -lmysqlclient
There is a quick solution to the problem -upgrade mysql! You’ll need Mac Ports installed, available at
http://macports.org/
Run the command
sudo port install mysql5
This will not destroy any existing data from your previous MySQL installation. The mac port installation will take a while, and it will appear as if it is just hanging. It’s not. It just takes a while. I clocked it at 15 minutes on a relatively fast network connection. Drink a cappuccino!
After you have the upgrade you’ll need to download Sphinx available at:
http://sphinxsearch.com/downloads.html (latest stable) and build the Sphinx engine from source like so:
wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar xzvf sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1/
./configure --with-mysql-libs=/opt/local/lib/mysql5/mysql/
--with-mysql-includes=/opt/local/include/mysql5/mysql/
make
sudo make install
Much thanks to this post b/c I spent forever trying to get the bundled version of MySQL linked properly:
http://www.fozworks.com/2008/9/5/rake-installation-of-sphinx-in-mac-osx
Posted 26 Jun 2009 — by admin
Category Linux
Short and sweet! Just remember that the finished zip filename is the first argument and the directory you wish to recursively zip comes after.
zip -r name_of_your_directory.zip name_of_your_directory
Posted 25 Jun 2009 — by admin
Category Linux
You can either link up the modules yourself like this:
ln -s /etc/apache2/mods-available/userdir.conf /etc/apache2/mods-enabled/userdir.conf
ln -s /etc/apache2/mods-available/userdir.load /etc/apache2/mods-enabled/userdir.load
Or you can use the Apache utility
a2enmod userdir
Just remember to restart the server with
/etc/init.d/apache2 force-reload
Also, keep in mind that by default, the home directory for your user will need to require a public_html directory.
/home/username/public_html
Apache comes with a command line utility called “htpasswd”. This utility will generate a username and password that you can use to authenticate against using a .htaccess file. Just run the utility like so:
htpasswd -c /path/to/your/password/directory/and-your-password-filename jane_doe_username
This will prompt you for a password/confirm password.
Keep in mind that this will not create a user on the system. It will just create a password and associate it with a string, that is the username you’ll use to authenticate in your request.
Then you’ll need to add a .htaccess file in the directory that you want to protect, and in that file place the following code.
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /path/to/your/password/directory/and-your-password-filename
Require user jane_doe_username
Remember that the /path/to/your/password/directory will need to be owned by Apache. on Ubuntu, it’s by default the www-data user. Change ownership like so:
chown -R www-data:www-data directory
If you run into problems using ActionMailer > 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following:
vim /etc/postfix/main.cf
Change
smtpd_use_tls=yes
to
smtpd_use_tls=no
OpenSSL support with Postfix does not work out of the box. You can either generate valid certificates or tell Postfix not to use the certificates. More information is available in this discussion forum.
http://forum.slicehost.com/comments.php?DiscussionID=2656
apt-get install librmagick-ruby1.8
apt-get install libmagickwand-dev
gem install rmagick
The last command will spit out a bunch of “No definition” comments. There are no rdocs available and this is why.