How to use `homebrew install --head` without first uninstalling? - homebrew

brew install --head <formula> installs a formula from master (usually). But it feels useless to me, because it fails if you've already got that formula installed due to a link conflict error. (Not even --force works.) Therefore you always have to do brew unlink <formula> first, or uninstall entirely.
I would have expected there to be a way to install a formula without linking it somehow, but apparently not.
Ultimately what I want is to have two copies installed, one the proper release, and one built from master. But the proper one should always have the link. (I would have like to have had another link like /usr/local/bin/<formula>_HEAD, but that's another issue.)
As a workaround, I can copy the formula and give at new name, but that seems gross, and you can't have a "--head-only" formula it seems, so I'd have to keep the version info up to date in the copy as well.
Maybe I need a totally separate installation of Homebrew? But that seems like overkill.

Related

uninstall and reinstall neo4j

On ubuntu 16.04, when trying to uninstall neo4j I typed:
sudo apt-get purge neo4j*
However, the neo4j folder and all of the data still exist in
/var/lib/neo4j
Secondly, I tried to just install the newest version using:
sudo apt-get install neo4j
and when I checked the version from the commandline I got:
neo4j 3.3.4
This is what I want, but when I start the service and check the version in the web application (http://localhost:7474/browser/), it says that the neo4j version is still 3.1.4.
So, basically I would like to completely remove neo4j, and download the newest version. What is the recommended way of doing this in ubuntu 16.04.
I'm new to neo4j, so I'm sure I'm missing something. Thanks for your help.
I followed the instructions here and they really helped.
Specifically, I deleted my old neo4j folder located in /var/lib/, and in it's place, I put the new version (which was downloaded from the link above and the top folder was renamed "neo4j"). I'm rebuilding my database from scratch, so I wasn't concerned about keeping any of the data I had previously (although maybe you could just copy it over to the new neo4j folder, I don't know).
I started the neo4j service by typing
/var/lib/neo4j/bin/neo4j start
and everything was brand new and seemed to be working. Part of the reason I did a fresh install was because I could not understand how to upgrade based on the documentation. I'll have to look into that more.
I also added the jar file for the corresponding apoc procedures to my plugins folder (/var/lib/neo4j/plugins), and adjusted the neo4j conf file (var/lib/neo4j/conf/neo4j.conf) accordingly:
dbms.security.procedures.unrestricted=apoc.*
and apoc procedures are now being recognized, which is fantastic.
Perhaps there is a better way to have done this, but things seem to be working so far. My database is small right now, so I can build it from scratch easily. Let me know if there is a better way to go about it.
well, I have tried the method above and it did not work. Since the main purpose is to use the verison 4.x.x of neo4j, I tried anothor way to reach the same effect.
At first, download the neo4j-community-4.x.x and put it in someplace where you want, then open the config/neo4j.conf file and change some configuration as follows:
dbms.connector.bolt.listen_address=:7688
dbms.connector.http.listen_address=:7475
After that, start the neo4j by running neo4j start and you shall access the neo4j from browser at localhost:7475, it did work for me. As for the old version, just let it go.

Made an edit to homebrew formula, now I want to save it

So I've made an edit to the tmux formula in homebrew, but now I'm starting to think about how I can keep that change between machines without forking and maintaining my own version of homebrew.
If I do fork homebrew, I would just have to edit and install script to point to my location, but would the formulas locations still be maintained?
So I guess my question is what are my options here? Should I fork homebrew or just make a note of the changes?
You can make your own tap. The easiest way is to create a repository on GitHub called homebrew-self. Your custom formula goes in the root of the repository. Then, you can use it in Homebrew by running
brew tap <your github username>
If you're modifying a formula that's already in Homebrew, though, the easiest (and best) way is to submit a pull request containing your changes.

Installing VIM in Minix 3.1.8

I've Googled this a thousand times and I cannot, for the life of me, get VIM to work on my Minix 3. For the record, I am running on a Windows machine with Minix 3 working on Oracle's VM VirtualBox.
I've tried typing,
# pkgin up && pkgin in vim
but I get the error:
pkgin: Can't open database /usr/var/db/pkgin/pkgin.db: unable to open database file: No such file or directory
I then try to do pkgin search git to search for a package, but I get the same error. Could this be some kind of Internet connection issue? I'm incredibly confused.
If you haven't already, download the binary package from here:
ftp://ftp.minix3.org/pub/minix/packages/3.3.0/i386/editors/
Change "i386" to your correct architecture, if different.
As you're probably already familiar, this page tells you how to install binary packages for Minix:
http://wiki.minix3.org/en/UsersGuide/InstallingBinaryPackages
As far as your "pkgin" errors, here are two possible solutions:
http://osdir.com/ml/minix3/2011-03/msg00244.html
How to install vim into Minix3?
I asked on the Minix 3 Google Groups Forums and they solved my problem. If anyone else has trouble, I'm pasting a response by Lionel:
Switch to http downloads by editing "/usr/pkg/etc/pkgin/repositories.conf" and comment out the line:
ftp://ftp.minix3.org/pub/minix/packages/$osrelease/$arch/All
and add the following:
http://www.minix3.org/pkgsrc/packages/$osrelease/$arch/All
Then do shutdown, boot, pkgin update and then install your desired packages.

homebrew: ngspice not building (x11.c:29:12: fatal error: 'X11/IntrinsicP.h' file not found and then some)

I'm a homebrew newbie (broob?). Trying to build ngspice I encounter the error described in the title. Before I get into that though, it turns out I actually don't even really want/need X11 support at the moment. I'm such a newbie I don't even know how to tell brew to leave out X. In the formula I see:
option "with-x", "Build with X support"
But if I build "--without-x" I still see the same error. How do you say "not --with-x"?
OK, on to the compile trouble:
I can see the file is really there in the X11 directories:
$ find /opt/X11/ -name IntrinsicP.h
/opt/X11//include/X11/IntrinsicP.h
But somehow homebrew is not seeing that include path. What the best way to alert brew to the location of this file? I tried:
ln -s /opt/X11/include/X11 /usr/local/include/X11
which works, in the sense that the include problem goes away, but it produces a linker problem:
ld: library not found for -lXaw
Again, I found some Xaw libs in /opt/X11, but I've not sorted out how to educate homebrew enough to actually link to them. ;-(
$ find /opt/X11/ -name "*Xaw*"
/opt/X11//include/X11/Xaw
/opt/X11//include/X11/Xaw/XawImP.h
/opt/X11//include/X11/Xaw/XawInit.h
/opt/X11//include/X11/Xaw3d
/opt/X11//include/X11/Xaw3d/Xaw3dP.h
/opt/X11//include/X11/Xaw3d/XawImP.h
/opt/X11//include/X11/Xaw3d/XawInit.h
/opt/X11//lib/libXaw.6.dylib
/opt/X11//lib/libXaw.7.dylib
/opt/X11//lib/libXaw.8.dylib
/opt/X11//lib/libXaw.dylib
/opt/X11//lib/libXaw3d.8.dylib
/opt/X11//lib/libXaw3d.dylib
/opt/X11//lib/libXaw6.6.dylib
/opt/X11//lib/libXaw6.dylib
/opt/X11//lib/libXaw7.7.dylib
/opt/X11//lib/libXaw7.dylib
/opt/X11//lib/libXaw8.8.dylib
/opt/X11//lib/libXaw8.dylib
/opt/X11//share/doc/libXaw3d
/opt/X11//share/man/man3/Xaw.3
Thanks for any suggestions!
-steve
I could reproduce this. This reflects an inconsistency in ngspice's configure that was not accommodated by the Homebrew formula. ngspice needs --without-x in configure to stop trying to link to X even though it needs --with-x to actually build X support.
This will be fixed once this pull request is accepted.
Homebrew welcomes these kinds of issues at the Github issue tracker; maintainers don't come around here much. Following the troubleshooting advice that brew recommends ("READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting") will make diagnosing problems easier in any venue. :)

How to migrate a Homebrew environment to another computer?

What is the preferred method of exporting a homebrew environment so I can synchronize my workspace between computers? Seems like there should be something similar to composer.lock or pip freeze. Is there a better way than brew list > brews.txt?
There is a better way: brew leaves.
This command prints a simple list of installed formulae which are not dependencies of any other formulae. Essentially this lists everything that was manually installed or is a leftover dependency from a removed formula.
$ brew leaves
apple-gcc42
bash-completion
brew-cask
git
[...]
There's no built-in means of using brew leaves output to install, but just having a clean list of manually-installed formulae is a step in the right direction.
Thanks to this Gabe Berke-Williams for writing about this: http://robots.thoughtbot.com/brew-leaves
Homebrew Bundle seems like a pretty great solution.
There is not a better way, and there are no current plans to make one.
Source: https://github.com/mxcl/homebrew/issues/17771
Use git! Maintaining repos for environment setup scripts is a pretty slick approach.
I highly recommend using a script to set up a development environment in the first place. thoughtbot has a really lightweight approach that provisions a development environment, including a bunch of brew formulas. https://github.com/thoughtbot/laptop. GitHub just open sourced boxen for this (and much more), but it has a somewhat steeper learning curve.
As you can see from the thoughtbot/latop readme, the entire install is a one-liner. If you want different packages, fork the repo and add whatever you use. This only covers the initial install, but it is a fantastic start.
For ongoing synchronization of development environments, including updating your preferred homebrew setup, you might want to try a 'dotfiles' approach. Zach Holman has a great approach detailed here: https://github.com/holman/dotfiles
If you want to tweak or update anything, just make the appropriate changes to the script (holman's dot script does the ongoing update stuff). Commit, push, pull down from any other environments.

Resources