Warning: brew-versions is unsupported and will be removed soon. Here's the first few lines of output for Elasticsearch: $ brew versions elasticsearch If your version of homebrew is more recent than October 2014, you'll need to install the boneyard tap in order to make the command available: $ brew tap homebrew/boneyard Up until around October 2014, Homebrew had a brew versions command that would list all the versions of a package, and the corresponding Git commands to roll the formula back. The homebrew formulae (that tells the brew command how to build each package) are all stored in a Git repository.Īll we need to do is to roll back the formula for the package we want to build to the latest commit that was active for that package. In my case, the version I'm looking for (version 1.2.1) isn't available as a tap, so I need an alternative approach. You can install one of them like this: $ brew install homebrew/versions/elasticsearch11 The first line of output refers to the default package, while the following line refers to the "tapped" versions that are also available. Homebrew/versions/elasticsearch-0.20 homebrew/versions/elasticsearch090 homebrew/versions/elasticsearch11 Old versions are maintained in the homebrew-versions repository, and show up in the output of homebrew search: $ brew search elasticsearch If a lot of people might need to use an old version of a package (or "formula", in homebrew's terminology), it might have been made available as a tap. It's useful to be able to install a specific version. Packages in homebrew are typically updated to provide the latest version of an app, which means that you can find yourself running more recent versions of your software in development, than in production. I develop Agile Planner on a Mac, and install software required by my app (such as PostgreSQL, memcached and Elasticsearch) using the homebrew package manager. This is often the case when hosting apps on a PaaS (Platform as a Service) provider such as Heroku. My preferred approach is to develop my code in a virtual machine containing the same operating system and software as my production server environment, but sometimes we don't have much control over the code we run on the server. When developing for the web, I like to make sure that the software I'm using in development is a close match for the code that I'm running on my live servers. On my system, this command returned /usr/local, the place where the Cellar folder can be found.Installing a specific version of a homebrew package If you don’t find this folder, run brew -prefix to find the correct folder prefix. Packages installed using Homebrew are all installed in a specific folder. Make sure you read everything Homebrew prints to the console, to avoid headaches later. If this is the case, those are typically highlighted to you at the end of the installation process. Sometimes packages (like the mysql package I used in the example above) will install, but they will require some additional steps before you can run them. You might never need any of those options - I very rarely use anything else than the default brew install. The command has a lot of options available, and you can check them out
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |