Running PHP#7.2 which requires version 2.5.0 of this lib or I get this error:
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.5.0.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
If I try the typical brew reinstall openldap libiconv solution, this installs 2.6.0 which PHP 7.2 won't use.
I've tried brew install openldap#2.5.0 but that doesn't work.
How can I get the older version 2.5.0 back on my system?
Install PHP 7.2 from the shivammathur/php tap:
(First, I recommend making a copy of /usr/local/Cellar/php#7.2 as a backup, in case any non-default files have been installed there.)
brew uninstall php#7.2
brew install shivammathur/php/php#7.2
How can I get the older version 2.5.0 back on my system?
#eComEvo you may want to improve the question by stating your system.
#fn-control-option you may want to improve your answer by providing the reader with information such as "its not a system specific issue" or the like.
Related
I am trying to install the ruby 2.6.5 on mac having m1 pro chip but it's giving error of "__rvm_make -j10".
I tried to google but won't find error with "__rvm_make -j10". there is one question with the same error on stackoverflow and i tried the same method but it won't worked too.
i tried "rvm install 2.6.5 --with-out-ext=fiddle"
i tried with open ssl 1.0 too, but not any one worked.
sammalik#Sams-MacBook-Pro rubyporgram % rvm install 2.6.5
ruby-2.6.5 - #removing src/ruby-2.6.5 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.0/arm64/ruby-2.6.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Updating certificates bundle '/opt/homebrew/etc/openssl#1.1/cert.pem'
Requirements installation successful.
Installing Ruby from source to: /Users/sammalik/.rvm/rubies/ruby-2.6.5, this may take a while depending on your cpu(s)...
ruby-2.6.5 - #downloading ruby-2.6.5, this may take a while depending on your connection...
ruby-2.6.5 - #extracting ruby-2.6.5 to /Users/sammalik/.rvm/src/ruby-2.6.5 - please wait
ruby-2.6.5 - #configuring - please wait
ruby-2.6.5 - #post-configuration - please wait
ruby-2.6.5 - #compiling - please wait
Error running '__rvm_make -j10',
please read /Users/sammalik/.rvm/log/1668327329_ruby-2.6.5/make.log
There has been an error while running make. Halting the installation.
UPDATE: Here's an updated blog post I wrote with the possible options if you really must use Ruby 2.6.x: https://www.rubyonmac.dev/how-to-install-ruby-2-6-on-macos-13-ventura
Instead, I highly recommend updating your project to at least 2.7.7. Here's a detailed guide I wrote that shows How and Why to Upgrade the Ruby Version in Your Project
Ruby 2.6.x is no longer supported on any Mac that has version 14 or higher of Apple's command line tools, which would be the case on macOS Ventura (13.0). Assuming you have Homebrew installed, you can check which version you have by running brew config, and then look towards the bottom for the lines that starts with CLT: and Xcode:
Ruby 2.6 reached end of life in March 2022, so it should not be used in production for security reasons. A lot of people get stuck because they think they have to use the version of Ruby that's specified in the project's .ruby-version and/or Gemfile. Instead, it's recommended to update the project to a newer version.
In most cases, it would be as easy as following these steps:
Install Ruby 2.7.7
Replace "2.6.x" with "2.7.7" in .ruby-version and Gemfile, and any other file where the Ruby version is specified (except Gemfile.lock because it should never be edited manually)
Run bundle install
Update any gems if necessary
Run your tests and make sure your app still works
Now that you know the recommended approach, let's go over 2 solutions in case you have a special need to use Ruby 2.6 before you update to 2.7.7:
Install Ruby with Homebrew
Downgrade to version 13.4 of the command line tools
Install Ruby with Homebrew
Install Homebrew if you haven't already
Install Ruby 2.6.10: brew install ruby#2.6
Follow the instructions for setting your PATH. For example, Homebrew will say something like this:
By default, binaries installed by gem will be placed into:
/opt/homebrew/lib/ruby/gems/2.6.0/bin
You may want to add this to your PATH.
If you need to have ruby first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc
The reason this works is because this is a pre-built version of Ruby that was compiled with version 13.3 of the command line tools. However, note that it's not officially supported.
Note that you'll need to disable RVM or any other version manager you might have used before. And you'll only be able to use 2.6.10 with this setup. You won't be able to switch to other versions that you might have installed with RVM or another version manager.
This is meant as a temporary solution so that you can run your project with 2.6.10 and then update it to 2.7.7. Also, note that either way, you will need to update your project to at least 2.6.10. There's absolutely no reason to use 2.6.5. You should always make sure your apps are running the latest version in a series. For 2.6, it's 2.6.10, for 2.7, it's 2.7.7, then 3.0.5, and 3.1.3.
Downgrade to version 13.4 of the command line tools
This is not possible on macOS Ventura (13.0), so don't waste your time trying. If you're on macOS Monterey, you can download version 13.4 of the command line tools from Apple's developer site, and then install them. I also wrote step-by-step instructions for installing version 13.4 of the command line tools if you need them.
The following works fine with macOS Ventura 13.1. You have to choose an older openssl version e.g. openssl#1.0.2t
Make sure you have home-brew installed /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(Optional) Check if you already have openssl versions installed via home-brew. Uninstall not ncessary versions brew uninstall openssl
Install openssl via home-brew: brew install openssl#1.0.2t
Check the path where your local home-brew packages go. In my case it is /usr/local/opt/openssl#1.0/.
Install ruby with rvm rvm install 3.1.3 --with-openssl-dir=/usr/local/opt/openssl#1.0/
I've been through a similar problem in Ubuntu 22.10. Here are some points that may help you:
Your OpenSSL may be too updated and probably has some breaking changes that don't allow some of your ruby C files to be compiled. Download a previous version at OpenSSL website, install it in a different location than your current version and use rvm install --with-openssl-dir=<old-openssl-dir> 2.6.5 as mentioned in Chris' answer.
Instead of using --with-openssl-dir option, you could add your old OpenSSL /bin and /include files directly in environment variables in your rvm command, like this: PATH=<old-openssl-bin-path>:$PATH C_INCLUDE_PATH=<old-openssl-include-path>:/usr/include rvm install 2.6.5. This could be useful in the case that --with-openssl-dir option isn't available for some reason. You also need to create links to the /lib files in your old OpenSSL folder. You'll probably find paired files like libssl.so and libssl.so.1.1. You can just move the version-named files into /usr/lib(or similar for macos), otherwise when you execute openssl command from your old OpenSSL folder, it will probably raise an error saying that openssl can't find libraries. If you choose to use this method, make sure that your rvm user bin files (at ~/.rvm/usr/bin) don't contain any files that may mess the ruby installing (like another openssl executable). You may get rid of this folder using rvm pkg remove.
Another possible solution is changing your gcc version. My OS came with gcc version 12.2.0, which comes with a change in computer gotos that failed my make step. To find errors in your ruby installation, check the make.log file specified at the rvm command error message and look for lines like this:
I'm running to issue installing Ruby 2.0.0 on a new macbook with macOS Catalina (version 10.15.7). At first I installed Ruby with rvm which did not work. I figured out that it was because Catalina's default terminal is ZSH instead of Bash (https://gorails.com/setup/osx/10.15-catalina). I was able to install Ruby 2.6.3 with the instructions but the issue is that the project I'm currently working on was written in Ruby 2.0.0. I tried installing this version with rbenv install 2.0.0-p0 but I ran to the following errors:
ruby-build: using libyaml from homebrew
Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/vydoan/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2
Installing ruby-2.0.0-p0...
WARNING: ruby-2.0.0-p0 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (Mac OS X 10.15.7 using ruby-build 20201005)
Inspect or clean up the working tree at /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.0q3Cat
Results logged to /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.log
Last 10 log lines:
compiling cont.c
compiling ./enc/ascii.c
thread.c:928:27: error: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
tp->tv_usec = ts.tv_nsec / 1000;
~ ~~~~~~~~~~~^~~~~~
compiling ./enc/us_ascii.c
1 error generated.
make: *** [thread.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
I've tried doing the follow:
1.
brew tap homebrew/dupes
which gives me this error log
Error: homebrew/dupes was deprecated. This tap is now empty and all its contents were either deleted or migrated.
brew install gcc
rbenv install 2.0.0-p0
which gives me the same errors as above.
I've asked my team and found that another person also have issue with installing ruby on their new mac machines. The older mac didn't not have this problem. Was anyone able to successfully install Ruby 2.0.0 on the newer mac?
Hello I had numerous issues trying to install ruby 2.2.7 the project I work on has quiet a deprecated version of ruby necessary stated above now I ran into numerous problems they use rvm I could not install 2.2.7 using rvm I have however succeeded using rbenv the thing that ruins your experience is mainly the command line tools provided by Apple since in newer version it does not support compiling older ruby versions.
I also run the same version of MacOS :
Your best bet (since I've tried several days in a row to get my setup working installing ruby being the biggest blocker).Go to apple's developer site and download an older version of command line tools here and browse for 11.4.1(Before running the next steps make sure to purge previous attempts and ruby version managers and symlinks so it won't interfere with you next install and make your life hard).
Before downloading and installing it check your gcc -v remember that and install the command line tools you've downloaded and check it again to see if things went according to plan you should get something like:
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I haven't tried other versions but this one works afterwards go to rbenv official website install the tools add the shell scripts to your local .zshrc file (if you don't have one just create it).Besides adding what the guide says it ommits an important step you also need to add this to your .zshrc:
export PATH="$HOME/.rbenv/bin:$PATH"
Then you should just close and open the terminal and install the ruby version you need :
# list latest stable versions:
$ rbenv install -l
# list all local versions:
$ rbenv install -L
# install a Ruby version:
$ rbenv install 2.0.0-p247
Consult the docs as of how to use them globally or locally also if use is not working end all terminal windows and the process restart and it should work just okay.
!Important mentions is to not change the command line tools when compiling different ruby related version may break the setup (ignore brew messages to update command line tools when running brew doctor)!
The full text of the error
The most important line, to my untrained eye, seems to be: ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
But am I really supposed to modify the Xcode build settings?
I am trying $ sudo gem install rails.
My specs:
macOS High Sierra 10.13.6
Xcode version: 10.0 (10A255)
Ruby version: 2.3.7p456
Gem version: 2.7.8
Recommendations I've found so far:
1) Install xcode command line tools. They are installed.
2) bundle config build.nokogiri --use-system-libraries.
/\ I've read that I should not do this.
Any help would be greatly appreciated!
As #anothermh mentioned, you shouldn't use system ruby. I'd mention further that you don't want to, and shouldn't need to, run sudo to install gems.
Use a ruby version manager such as asdf (my recommended), rvm (probably one of the most popular), or rbenv (also a solid choice).
I'd also recommend, if you haven't done it already, that you grab homebrew because you'll need a few dependencies. Highly recommend at least:
brew install gcc libxml2 readline
I've tried to bundle install and had issue like this. In my case upgrading rails from 4.2.5. to 4.2.9 fixed error. Maybe it will help someone to not lose time.
I installed PhantomJS today and got this error trying to use it:
PhantomJS version 1.4.0
is too old. You must use at least version 1.7.0
(Capybara::Poltergeist::PhantomJSTooOld)
How can I install the newer version?
I can get the newer version (1.7) at: http://phantomjs.org/download.html
Once I've downloaded it though how do I actually install it?
Are you using Linux or OS X? You'll need to either build from source or install an updated PhantomJS package. You can also download the binaries and install over the system installed PhantomJS. Type "which phantomjs" and it should show the location of PhantomJS.
If you're using homebrew, just:
brew upgrade phantomjs
I had to solve this problem yesterday, it required me updating brew, telling brew to uninstall phantomJS, then updating xcode, then installing the latest xcode command utilities, then using brew to re-install phantomjs. Finally that got it to pull in the latest version. You might try this (mac):
brew update
brew uninstall phantomjs
brew doctor (follow the fixes it recommends if any... Mine was updating xcode)
brew install phantomjs
At that point it should grab the latest.
Good luck!
I am trying to use paperclip on macosx with phusion passenger. When i try to make an upload, apache give me :
dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /usr/local/lib/libtiff.3.dylib
Reason: Incompatible library version: libtiff.3.dylib requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0
But when i run my rails application with rails server, everything works fine. When i try to use the identify command in my terminal as well.
Paperclip give me this error :
/Var/Folders/Nj/9xt2kprd01n3ssch3rd44pmh0000gn/T/Stream20120222-92627-1l2u297.Png Is Not Recognized By The 'Identify' Command.
Any idea? I am using MacOsx Lion
Further to my comment, I just had a similar problem and solved it as follows (not sure if this will work for you).
As per this homebrew/imagemagick issue, precompiled binaries may reference the wrong library versions when something else is upgraded.
Therefore, recompiling Imagemagick from source may help. For my own install, via Homebrew, this did it:
> brew uninstall imagemagick
> brew install imagemagick --build-from-source
My guess is that in your case Apache and/or Passenger may be calling a different version of Imagemagick, or operating as a different user with different load paths and therefore not finding the library.
I was running into this same issue on OS X 10.8 and reinstalling imagemagick from source had no effect but reinstalling libtiff from source did. yay! :)
brew uninstall libtiff
brew install libtiff --build-from-source
I found this out by using otool -L which showed that somehow libtiff was pointing to a newer version of libjpeg than installed on my system. reinstalling it from source causes it to link against the older version.
hope that helps!