I'm looking for a solution to save all installed formulae, similar to what package.json does for npm, or any other package manager with it's config file.
Is this possible with homebrew?
I use this:
for p in $(brew list); do brew info $p; done > brewconfig.txt
If you wanted something a little more complete and legible:
#!/bin/bash
brew list > brew-packages.txt
for p in $(brew list); do
brew list $p > brew-$p-files.txt
brew info $p > brew-$p-config.txt
done
which gives this
-rw-r--r-- 1 mark staff 381 4 Mar 13:02 brew-wget-files.txt
-rw-r--r-- 1 mark staff 617 4 Mar 13:02 brew-wget-config.txt
-rw-r--r-- 1 mark staff 496 4 Mar 13:02 brew-zlib-files.txt
-rw-r--r-- 1 mark staff 377 4 Mar 13:02 brew-zlib-config.txt
-rw-r--r-- 1 mark staff 3849 4 Mar 13:02 brew-zeromq-files.txt
-rw-r--r-- 1 mark staff 455 4 Mar 13:02 brew-zeromq-config.txt
-rw-r--r-- 1 mark staff 4292 4 Mar 13:02 brew-xz-files.txt
-rw-r--r-- 1 mark staff 309 4 Mar 13:02 brew-xz-config.txt
There is! brew tap homebrew/brewdler and brew brewdle dump. See brew brewdle help for details.
Related
Even after running brew link --overwrite python#3.10, the symlink /usr/local/opt/python#3 does not point to version 3.10. Worse, it removed the /usr/local/opt/python symlink (that was also pointed to 3.9)
l /usr/local/opt/ | grep python
lrwxr-xr-x 29 vivekragunathan admin 2 Jun 12:07 python#3 -> ../Cellar/python#3.9/3.9.13_1/
lrwxr-xr-x 29 vivekragunathan admin 18 May 14:39 python#3.8 -> ../Cellar/python#3.8/3.8.13_1/
lrwxr-xr-x 29 vivekragunathan admin 2 Jun 12:07 python#3.9 -> ../Cellar/python#3.9/3.9.13_1/
lrwxr-xr-x 28 vivekragunathan admin 8 Jul 12:17 python#3.10 -> ../Cellar/python#3.10/3.10.5/
What do I have to do so that I have symlinks python and python#3 under /usr/local/opt point to the latest version (3.10 now)?
The reason why you saw python#3 was pointing to python#3.9 is because python#3 is an alias to python#3.9. There is a WIP PR for migrating the alias to point to python#3.10`.
I'm trying to build the Android Support Testing project. I'm following these instructions. I've got my build env setup and I've synced the Repo. When I try to build the project I get this error.
$ pwd
/Volumes/android/android-support-test
$ ls -l
-r--r--r-- 1 me staff 87 Feb 5 12:56 Makefile
-rw-r--r-- 1 me staff 749 Feb 5 16:14 android-support-test.iml
drwxr-xr-x 11 me staff 374 Feb 5 12:56 build
lrwxr-xr-x 1 me staff 31 Feb 5 12:57 build.gradle -> frameworks/testing/build.gradle
drwxr-xr-x 16 me staff 544 Feb 5 12:57 external
drwxr-xr-x 4 me staff 136 Feb 5 12:57 frameworks
drwxr-xr-x 3 me staff 102 Feb 5 16:14 gradle
-r-xr-xr-x 1 me staff 5884 Feb 5 12:57 gradlew
lrwxr-xr-x 1 me staff 35 Feb 5 12:57 local.properties -> frameworks/testing/local.properties
drwxr-xr-x 3 me staff 102 Feb 5 16:17 out
drwxr-xr-x 7 me staff 238 Feb 5 12:57 prebuilts
lrwxr-xr-x 1 me staff 34 Feb 5 12:57 settings.gradle -> frameworks/testing/settings.gradle
$ ./gradlew assembleDebug
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.5/userguide/gradle_daemon.html.
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* Where:
Build file '/Volumes/android/android-support-test/frameworks/testing/build.gradle' line: 16
* What went wrong:
A problem occurred evaluating root project 'android-support-test'.
> Could not read script '/Volumes/android/android-support-test/version.gradle' as it does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.31 secs
The version.gradle file is in /Volumes/android/android-support-test/frameworks/testing but build.gradle is looking for it in /Volumes/android/android-support-test.
I think the aliasing of build.gradle -> frameworks/testing/build.gradle is not working correctly. Am I missing something?
The frameworks/testing Repo project should have contained an additional sym link, but you can just create it yourself:
ln -s frameworks/testing/version.gradle version.gradle
h/t to John Lombardo on the Android Testing Support Library google group
Im trying to follow a tutorial to do a CORBA assignment.
project
-Client/HelloClient.java
-Server/HelloServer.java
-Hello.idl
I do the first step, trying to compile the IDL (from the project root), and it fails.
$ idlj –td Client –fclient Hello.idl
com.sun.tools.corba.se.idl.InvalidArgument: Invalid argument: –td.
java version "1.8.0_11"
$ ls -l
total 16
drwxr-xr-x 3 juliusskye staff 102 Oct 28 20:14 Client
-rw-r-----# 1 juliusskye staff 85 Oct 28 17:49 Hello.idl
drwxr-xr-x 3 juliusskye staff 102 Oct 28 17:52 Server
-rw-r--r-- 1 juliusskye staff 425 Oct 29 13:45 idljintro.iml
drwxr-xr-x 2 juliusskye staff 68 Oct 29 13:45 src
I found this which says CORBA has problems parsing paths with / in front. But mine doesn't have a /
apparently the Lecturer's instructions were wrong or outdated or the compiler is not fully working but compilation of all files is achieved by
idlj -fall hello.idl
I want to save the content of a page with the system command curl but it's not working.
I think it's a problem with localhost but I don't know how to solve this.
def save_page
`/usr/bin/curl -O http://127.0.0.1:3000/category_plist`
end
Server output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:04:54 --:--:-- 0
If you change your function to the following it should work ...
def save_page
system("/usr/bin/curl -O http://127.0.0.1:3000/category_plist")
end
To test commands like this, exit your local webserver and run "rails console", from there you can enter a command such as this and get an immediate response ...
$ rails console
Loading development environment (Rails 3.1.0.rc4)
1.9.2-p290 :001 > puts system("ls -l")
total 56
-rw-r--r--# 1 creativetechnologist staff 212 3 Feb 2011 Capfile
-rw-r--r--# 1 creativetechnologist staff 924 6 Feb 2012 Gemfile
-rw-r--r--# 1 creativetechnologist staff 3072 6 Feb 2012 Gemfile.lock
-rw-r--r--# 1 creativetechnologist staff 3943 16 Oct 23:16 MOR_git.tmproj
-rw-r--r--# 1 creativetechnologist staff 18 12 Jul 19:06 README
-rw-r--r--# 1 creativetechnologist staff 267 30 Aug 2011 Rakefile
drwxr-xr-x 7 creativetechnologist staff 238 30 Aug 2011 app
drwxr-xr-x 11 creativetechnologist staff 374 13 Sep 2011 config
-rw-r--r--# 1 creativetechnologist staff 157 30 Aug 2011 config.ru
drwxr-xr-x 6 creativetechnologist staff 204 3 Feb 2011 db
drwxr-xr-x 3 creativetechnologist staff 102 3 Feb 2011 doc
drwxr-xr-x 4 creativetechnologist staff 136 3 Feb 2011 key
drwxr-xr-x 6 creativetechnologist staff 204 7 Sep 2011 lib
drwxr-xr-x 6 creativetechnologist staff 204 11 Mar 2012 log
drwxr-xr-x 3 creativetechnologist staff 102 30 Aug 2011 logs
drwxr-xr-x 13 creativetechnologist staff 442 6 Feb 2012 public
drwxr-xr-x 3 creativetechnologist staff 102 3 Feb 2011 script
drwxr-xr-x 8 creativetechnologist staff 272 3 Feb 2011 test
drwxr-xr-x 6 creativetechnologist staff 204 3 Feb 2011 tmp
drwxr-xr-x 3 creativetechnologist staff 102 3 Feb 2011 vendor
true
=> nil
1.9.2-p290 :002 >
Hope that helps.
Try this:
def save_page
`/usr/bin/curl -s http://127.0.0.1:3000/category_plist` # -s will silent curl's output except the page
end
Ok so I had RVM working before but after I upgraded to Mountain Lion it appears to be gone? So I tried reinstalling it:
Ayman$ curl -L https://get.rvm.io | bash -s stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 200 0 --:--:-- --:--:-- --:--:-- 755
100 9979 100 9979 0 0 5911 0 0:00:01 0:00:01 --:--:-- 5911
Downloading RVM from wayneeseguin branch stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 125 100 125 0 0 67 0 0:00:01 0:00:01 --:--:-- 102
100 1047k 100 1047k 0 0 159k 0 0:00:06 0:00:06 --:--:-- 245k
Upgrading the RVM installation in /Users/Ayman/.rvm/
RVM PATH line found in /Users/Ayman/.zshrc.
RVM sourcing line found in /Users/Ayman/.zlogin.
Upgrade Notes:
* No new notes to display.
# RVM: Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm
# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
Upgrade of RVM in /Users/Ayman/.rvm/ is complete.
# Ayman ####,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne
rvm 1.15.5 (stable) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]
Should be installed right? Should be ready to go but...
Ayman$ which rvm
Ayman$ rvm requirements
-bash: rvm: command not found
Ayman$ rvm use 1.9.2 --default
-bash: rvm: command not found
Now sure what to do? Looked at my .bash_profile and .bashrc to see what's there:
Ayman$ ls -la
total 136
drwxr-xr-x+ 26 Ayman staff 884 Aug 23 20:44 .
drwxr-xr-x 6 root admin 204 Aug 8 19:27 ..
-rw------- 1 Ayman staff 3 Jun 16 15:21 .CFUserTextEncoding
-rw-r--r--# 1 Ayman staff 21508 Aug 23 08:03 .DS_Store
drwx------ 10 Ayman staff 340 Aug 23 07:57 .Trash
-rw------- 1 Ayman staff 9089 Aug 23 20:47 .bash_history
-rw-r--r-- 1 Ayman staff 106 Aug 22 21:17 .bash_profile
-rw-r--r-- 1 Ayman staff 24 Aug 23 20:47 .bashrc
drwxr-xr-x 3 Ayman staff 102 Aug 21 20:41 .bundler
drwxr-xr-x 3 Ayman staff 102 Jun 24 21:45 .gem
-rw-r--r-- 1 root staff 155 Aug 21 22:52 .gemrc
-rw-r--r-- 1 Ayman staff 61 Aug 21 19:40 .gitconfig
-rw-r--r-- 1 Ayman staff 14 Aug 23 08:14 .irb_history
-rw------- 1 Ayman staff 2415 Aug 23 20:44 .mysql_history
drwxr-xr-x 29 Ayman staff 986 Aug 23 20:58 .rvm
-rw-r--r-- 1 Ayman staff 118 Jun 24 21:25 .zlogin
-rw-r--r-- 1 Ayman staff 59 Jun 24 21:25 .zshrc
drwx------+ 18 Ayman staff 612 Aug 23 08:02 Desktop
drwx------+ 5 Ayman staff 170 Jun 24 23:04 Documents
drwx------+ 19 Ayman staff 646 Aug 22 21:05 Downloads
drwx------# 47 Ayman staff 1598 Aug 9 22:30 Library
drwx------+ 3 Ayman staff 102 Jun 16 15:21 Movies
drwx------+ 5 Ayman staff 170 Jun 24 23:05 Music
drwx------+ 57 Ayman staff 1938 Aug 19 22:40 Pictures
drwxr-xr-x+ 5 Ayman staff 170 Jun 16 15:21 Public
drwxr-xr-x 5 Ayman staff 170 Aug 23 07:57 Sites
Here is my nano .bashprofile:
PS1="\u$ "
alias ll="ls -lahG"
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
Here is my nano .bashrc (I changed it per instructions in another stackoverflow answer):
PATH=$PATH:~/.rvm/bin
Any clue as to what to try next? Thanks!
to force update of rc files:
curl -L https://get.rvm.io | bash -s stable --auto-dotfiles
Mac OS runs .bash_profile but not .bash_rc when you create a new terminal. Move those PATH things into .bash_profile and run again.
As to your second problem, seems you add wrong things into PATH. Add followings into .bash_profile:
PATH=$PATH:$HOME/.rvm/scripts # Add RVM to PATH for scripting
. rvm > /dev/null