I'm trying to get Sphinx (and thinking Sphinx working). It have worked before - but it stopped working tonight after my colleague installed Node, php and some other stuff.
It first complained about a locked pid file:
FATAL: failed to lock pid file
After this I tried to reinstall Sphinx:
brew uninstall sphinx
And:
brew install sphinx.
I already have mysql so I skipped --mysql. This results in the following:
This is not sphinx - the Python Documentation Generator.
To install sphinx-python: use pip or easy_install,
Sphinx has been compiled with libstemmer support.
Sphinx depends on either MySQL or PostreSQL as a datasource.
You can install these with Homebrew with:
brew install mysql
For MySQL server.
brew install mysql-connector-c
For MySQL client libraries only.
brew install postgresql
For PostgreSQL server.
We don't install these for you when you install this formula, as
we don't know which datasource you intend to use.
When running searchd I get this:
FATAL: no readable config file (looked in /usr/local/Cellar/sphinx/2.2.6/etc/sphinx.conf, ./sphinx.conf).
And when trying to start thinking-sphinx for my rails app I get:
Failed to start searchd. Check the log files for more information.
And the log file still says:
FATAL: failed to lock pid file
I'm not sure what is causing this, or how I can fix it. Thought that reinstalling Sphinx would be enough - but I'm stuck at square one.
Any ideas on how I can get it to work again?
How about uninstalling sphinx and giving this a go:
brew install sphinx --pgsql --mysql
Related
Recently I updated my MacOS to Monterey 12.3 which included updates for xcode.
After that I am not able to run the rails application that I have been working on. I keep getting this error when I try to spin up the server.
I have tried installing and removing mysql different ways. Both using a brew install and DMG file from mysql website.
I am able to access the database instance through my command line but I think they issue is that it I can't connect from application. Anyone else having similar issues?
here is the full error
/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require': dlopen(/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): Library not loaded: libssl.1.1.dylib (LoadError)
Referenced from: /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
Reason: tried: 'libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file), '/Users/gus/gus_project/Gus2021/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file) - /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
If anyone runs into this problem, this is what solved my issue.
paths to openssl needed to be updated.
gem install mysql2 -- --with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib --with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
bundle install
Obviously this is for openssl install with brew install version 1.1
I was able to get it working with this:
brew install openssl
bundle config build.mysql2 --
--with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib
--with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
brew install openssl#1.1
Do all the export path things, and make sure to link openssl#1.1
brew link openssl#1.1 --force
I had similar issue with postgresql, which raises error while running psql -d database:
Library not loaded: '/opt/homebrew/opt/openssl#1.1/lib/libssl.1.1.dylib'
In my case which I have openssl#3 and openssl# the solution is:
brew install openssl#1.1
brew link openssl#1.1 --force
Then reinstall postgresql with homebrew.
I also had my zshrc exporting the following ENV variable though I'm not quite sure if it's related:
export PATH="/opt/homebrew/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
For someone who runs into the same issue as mine!
This question has been asked before here (404 error when using brew to install mysql), but unfortunately the fix doesn't work for me. I have already ran brew update, so I'm up to date.
I'm on the latest version of MacOS 10.12 and I am running Xcode 8 if that matters.
brew install mysql
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
==> Downloading https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.11.tar.gz
curl: (22) The requested URL returned error: 404 Not Found Error:
Failed to download resource "mysql" Download failed:
https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.11.tar.gz
I know it says this is a pre-release version, but is there any hope here?
Thanks
The 5.7.11 mysql download you reference no longer exists (it certainly is 404).
Looking at the homebrew formula for mysql, it has been updated to point to the latest mysql version.
So it seems that you are not in fact up to date. Try running brew update twice, then brew doctor and fix any warnings.
There have been some big changes in homebrew over the last 9 months, if you have an old install it might be easier to uninstall totally. There are also several ownership and directory location changes that need to be straightened out with the upgrade to homebrew 1.0
I followed the steps laid out here: Brew Update not working after mac 10.9
In case that's not visible anymore, here's that answer:
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
After that, you should be able to brew update and then brew install mysql
For those who are still struggling to resolve this.
Please try:
brew update-reset
brew update
I found this gem here.
P.S.: If you have a shallow clone, after brew update-reset command, run the following command to unshallow:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
I'm starting a project where im going to use AngularJS, NodeJS and MySQL. This is my first real web application, and it's also the first time im using npm.
I've installed Node from their official website, and when i write npm install the node_modules comes to the project directory.
The problem occurs if I try to use any of the installed npm_modules. I tried to download mysql, and the installation worked, but when i type mysql -p i get: "bash: mysql: command not found"
I've also tried to install it with npm install mysql -g, but it still doesn't work.
If it means anything my $PATH is /usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/bin
The mysql npm package contains just the nodejs client library for mysql. You need to install the mysql server separately using the appropriate method for your OS.
it looks like you have not installed mysql on your system.
install mysql server using the following command
sudo apt-get install mysql-server
I am trying to install a software which required MySQL-server, MySQL-client installed on the server so now I want to install MySQL-server and MySQL-client using rpm files "MySQL-server-5.5.17-1.rhel5.x86_64.rpm" and "MySQL-client-5.5.17-1.rhel5.x86_64.rpm".
I have installed MySQL-client but when I try to run mysql-server
*rpm -i MySQL-server-5.5.17-1.rhel5.x86_64.rpm*
it's showing error:
*error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
So how can i solve this problem?
the error given by you *error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
It clear show that the machine you are going to install mysql 5.5 rpm have mysql 5.0.77 installed .
to resolve this problem .
1. you take backup of datadir and my.cnf (if you are using mysql 5.0 db server earlier).
2. remove all mysql 5.0 server packages , to remove these package you should knew what are the packages already installed on machine
to view all mysql package already installed use rpm -qa | grep -i "mysql*" this command show what package is already installed on machine
now you have to remove all package which name shows in above command.
to remove a package/rpm use rpm -e mysql-5.0.** if show error then use
rpm -e --nodeps mysql-5.0.**
we have to remove all packages one by one by using rpm -e .
after successful remove all older version of mysql , now start installation of mysql-5.5*** packages by using rpm -ivh mysql-5.5***.rpm.
First question - is the version of MySQL already installed actually in use or was it simply there as a result of a fresh CentOS install? If the former, try upgrading rather than installing. If the latter, uninstall the old version (possibly using the --no-deps option on rpm) and then install the newer version
Next, are you trying to replace MySQL or install another version alongside it?
If the former, again try upgrading rather than installing. If that's not possible, you're going to have to remove the older version and then install the new version
If the latter, and if it is possible, look at the --prefix and --relocate options in RPM.as they may help.
If you do to mange to get it installed side by side with an older, you'll have fun and games ensuring that the relevant versions are pointing to the correct libraries and that you don't get any corruption between them. Also, you will need to run them so that they listen on separate ports with separate database folders, PID and socket files etc.
Whatever you need to do, do it out of business hours with as many backups as you can do
I seem to be getting this issue when trying to run a Rails 3.x site with POW using the mysql2 gem and on OSX Lion.
[FATAL] failed to allocate memory
Also I am running Rails 2.x apps successfully with the same setup under POW.
I'm assuming this is an issue related to Lion + MySQL2 as other errors seem to indicate this to be the source but I can't seem to locate the issue.
Any ideas?
I had the same problem when I used to mysql-connector-c & mysql. The problem was in mysql-connector-c which had old dylib. So problem resolved by removing mysql-connector-c, the next you have to change shell variable DYLD_LIBRARY_PATH or make symbol link for libmysqlclient.18.dylib. You should reinstall mysql2 gem after this.
To change DYLD_LIBRARY_PATH insert export DYLD_LIBRARY_PATH=/usr/local/Cellar/mysql/5.5.20/lib/:$DYLD_LIBRARY_PATH in your ~/.baschrc and reload shell
To make symbol link for libmysqlclient.18.dylib evaluate in your shell this command:
ln -s /usr/local/Cellar/mysql/5.5.20/lib/libmysqlclient.18.dylib /usr/local/lib/
I used here directory where my mysql installed. Change it to your's if you have another mysql location.
This turned out to be a problem with node (installed using Homebrew) for me.
So I uninstalled and reinstalled node using Homebrew
first:
brew uninstall node
then:
brew install node