I am trying to make a regex search on a pdf file on Mac.
For that, I'm trying to install pdfgrep. I have cloned the repository, but I'm not sure how to install it.
On the README, it says to
use the standard procedure:
./configure
make
sudo make install
,but just running these commands doesn't make the installation.
Can anyone help me?
use brew install pdfgrep or install macports and run port install pdfgrep
running brew install pdfgrep worked for me :)
If you want to use the regular expression (PCRE) option, please use brew install pdfgrep --with-pcre. Or brew reinstall pdfgrep --with-pcre if you already installed pdfgrep.
Related
I want create an automated script to use on a post installation.
For this reason i want use brew and cask to make it all.
So, i think that my script should start with that to install brew:
echo << "Installing homebrew..."
if test ! $(which brew); then
echo "Homebrew not found, Installing..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
Then i need to install some useful stuff as i see here:
http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
So i put this too on my script:
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Bash 4
brew install bash
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
$PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
After that, the guide on the link says to install all the apps with cask and clean.
Here is my question.
I wish install and can update them in future using the classical Application folder of mac
How i can do that?
Maybe i should put this line:
export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/usr/local/Caskroom"
Before all the commands to install the apps? May it works? (I have found this line here around)
If this line is correct can I update my apps using a brew/cask command?
Sorry for the dumbs questions, I've just discovered brew and cask yesterday :)
Any suggestion or example for this script is well accepted :)
brew cask install <formula> is supposed to symlink your app in Applications automatically.
I've installed PHP 7 on my mac using Homebrew i.e.
$ brew install php70
Also I want to have the the XDebug setup on my machine.
Ideally I would love to have an easy solution like using brew again, but unfortunately it seems there is no such formula exist (at least yet), and the latest package is homebrew/php/php56-xdebug.
I thought before start the manual installation, check here to see if there are any other workaround.
Any advice will be greatly appreciated.
First, make sure you're on the version of PHP for which you want Xdebug installed. It needs to be installed separately for each major version (7.0 vs 7.1 vs 7.2). You can check your version using php -v.
Then, run pecl install xdebug.
Once it's finished installing, you'll see a message like this:
Installing '/usr/local/Cellar/php/7.2.8/pecl/20170718/xdebug.so'
Then go to your php.ini (which you can find by running php --ini, and add these two lines to it:
zend_extension="/usr/local/Cellar/php/7.2.8/pecl/20170718/xdebug.so"
xdebug.remote_enable=on
Obviously, change the path to whatever was printed by the pecl xdebug installation.
It is available in Homebrew now as homebrew/php/php71-xdebug.
Try:
brew install php71-xdebug
and if that doesn't work:
brew install --build-from-source php71-xdebug
Source: xdebug install on php70
As stated by Homebrew, Homebrew/php tag was deprecated.
So it's not possible to install xdebug through Homebrew anymore. Please use PECL instead: https://xdebug.org/docs/install#pecl
Since Brew is no longer working, you can use pecl to install the debugger.
It's not as good as brew, you may run into dependency problems but it works. Install php with brew, whatever version you want, then use pecl.
brew install php
pecl install xdebug
Xdebug 2.4.0beta1 already supports PHP 7. Unfortunately the only way for installation for now is to compile it from the source code.
If brew install php71-xdebug is not working, and it returns this error:
Error: No available formula with the name "php71-xdebug"
Try run this command first: brew tap homebrew/php .
I installed lua on my OSX 10.10 machine using brew install lua. The version that got installed was 5.2.4. LuaRocks was installed along with the lua package. But when i run luarocks install <package_name> i get Error: ##HOMEBREW_PREFIX## does not exist and your user does not have write permissions in. i tried using sudo luarocks install <package_name> as well, but it gives the same error. How to fix this ?
Please Help.
Thanks
This was a bug in the way we relocate text files to ensure wider bottle portability for non-/usr/local users.
It was resolved a couple of weeks back, July 31st I believe. Presuming your Homebrew is in a standard location, if you do:
rm /usr/local/etc/luarocks52/config-5.2.lua && brew update && brew reinstall lua
The problem should be resolved now. Apologies!
I had the same problem when using the luarocks when installed with homebrew, try installing luarocks again like this:
$ wget http://luarocks.org/releases/luarocks-2.2.1.tar.gz
$ tar zxpf luarocks-2.2.1.tar.gz
$ cd luarocks-2.2.1
$ ./configure; sudo make bootstrap
I took this code snippet from here: https://luarocks.org/
I managed to install all the modules that I required without problems after doing this.
Zenity is required for some apps like winetrick-gtk and its not installed automatically when you install winetricks. The problem is brew install zenity does not work, as such a package does not exist. The question is how can I install it manually in Homebrew?
I have installed zenity using Macports. However, every time I use Homebrew I get a warning complaining that Macports is installed. So if I can install it using Homebrew I will be able to get rid of Macports as I don't use it at all.
For anyone arriving now, the x11 tap has been merged upstream, so you can simply brew install zenity and everything should work.
The homebrew-x11 tap provides a formula for zenity, so just brew install homebrew/x11/zenity.
If anyone wants a (largely compatible) "port" that doesn't require X:
brew install ncruces/tap/zenity
Source code: https://github.com/ncruces/zenity
I am trying to use the po2json parser/converter from the JS gettext library (http://jsgettext.berlios.de/), but when I try to convert I get this error:
Can't locate JSON.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.4 /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 ./po2json line 23.
BEGIN failed--compilation aborted at ./po2json line 23.
As far as I understand I am missing a perl module, namely JSON.pm, an I think it's this one: http://cpansearch.perl.org/src/MAKAMAKA/JSON-2.53/lib/JSON.pm
Now, how do I install it on OSX? I am using Mountain Lion.
I tried to do cpan install JSON, but it doesn't work, I get the following error:
Writing Makefile for JSON
MAKAMAKA/JSON-2.53.tar.gz
make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Use homebrew to install cpanm:
brew install cpanm
Then you can install JSON with
sudo cpanm install JSON
The output said that make didn't return success. Probably due to some dependency.
Try using cpanm http://search.cpan.org/~miyagawa/App-cpanminus-1.5017/bin/cpanm, it's really hassle free and bootstrapped quite well (no need to install other stuff).
Install using this:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
cpan install JSON Having the JSON in all caps made it work for me.
I know this is an old topic, but wanted to share my solution after finding that I needed JSON when trying to use zap2xml (perl based). I was getting the error: "Can't locate JSON.pm in #INC..." after installing perl via Homebrew.
This is how I installed JSON via Homebrew. I will also include the steps required to install Homebrew (for those who would like to know). ;)
Prerequisites:
Install Xcode from the App Store (Download):
https://itunes.apple.com/us/app/xcode/id497799835
Install Command Line Tools for Xcode (Run in Terminal):
xcode-select --install
Install Homebrew (Run in Terminal):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Update Homebrew (Run in Terminal):
brew update
brew upgrade
brew doctor (correct issues found by brew doctor. Instructions will be given by The Doctor. :P)
Install cpanminus (Run in Terminal):
brew install cpanm
Check perl (Run in Terminal):
which perl
perl -V (with a capital -V)
Check/Install JSON module (Run in Terminal):
sudo cpanm -v JSON
DONE.
Following worked for me:
Run on terminal:
sudo perl -MCPAN -e shell
you should get the cpan shell prompt and run below commond at cpan shell:
cpan[1]> install JSON
Regards,
Anand Choubey
this way is OK, Follows the Command:sudo apt-get install libjson-perl