How to Start Dropbox After Installing It with Homebrew Cask? - macos

I just started using Homebrew and Cask today to install Unix and OS X applications on my Mac but I don't understand something about Cask. When I run this command,
brew cask install dropbox
I can see that it installs it in /opt/homebrew-cask/Caskroom/dropbox/latest/Dropbox.app and I can see that it has created a symlink ~/Applications/Dropbox.app that points to it, but when I look in Finder at my Applications folder, I don't see it there as I would if I had installed Dropbox from a .dmg file. Also, I don't know how to start Dropbox from this symlink. How do I get Cask to install OS X apps so that I can start them from either the Application folder or via the command line in a terminal session?

just run open ~/Applications/Dropbox.app from your cmd line.
See http://gillesfabio.github.io/homebrew-cask-homepage/ for overview.
Hope that helps

The behavior has changed over the last few months. If you update homebrew to version 1.0 and then run brew cask install dropbox, the application will now be physically moved into /Applications/, and the symlink will be created in ~/Applications/.

Related

Install chromedriver on Mac M1 at specific location?

I just made the jump from Ubuntu to MacBook Air M1.
I am trying to set-up the system in a way that I don't have to change scripts for both. i.e. I want to keep the scripts in such a way that editing on either system is ok.
In a script I use the following line of code:
driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")
I used Homebrew to install chromium-browser but I can't find the file (so I can move it to this location?).
I have tried almost everything I could look up and can't figure it out. What can I try next?
Install webdriver-manager, it allows you install and store chromedrive automatically
pip install webdriver-manager
and use like this:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
The fastest way to to solve is using Home Brew:
brew install --cask chromedriver
Chromedriver will be installed in the correct path.
You can find the downloads for various versions of the Chrome driver here: https://chromedriver.chromium.org/downloads
For example, for v99 on Mac M1 you could download this archive: https://chromedriver.storage.googleapis.com/99.0.4844.51/chromedriver_mac64_m1.zip
Once downloaded just unzip & copy to whatever location you choose. After I installed I still needed to mark the application as "safe" in macOS, I followed the instructions here: https://stackoverflow.com/a/60362134/1371489

Why Homebrew didn't removed Python directory?

I ran brew uninstall python but there's still the directory /usr/local/lib/python2.7.
Why brew didn't removed it? Is it still used? Can I remove it manually?
The folder /usr/local/lib/python2.7 is a directory shared with the system and it isn't owned by Homebrew: as you might now usr/local/Cellar is the proper Homebrew folder (along with several other spurious folders for taps and Cask).
It mainly contains packages (installed using pip).
I wouldn't touch such folder, since it is shared with the Python installation provided by OS X (through XCode Command Line Tools): if for any reasons (but I don't think so since you uninstalled python through Homebrew) you still have pip installed I would recommend to uninstall such packages through pip itself if you want to cleanup some space.

Install libSVM on Mac OSX and use easy.py and grid.py

I spent quite some time figuring out how to install libSVM on Mac OSX and use easy.py and grid.py. I've done quite some research but there are problems such as gnuplot isn't installed in the place where easy.py is calling it with brew.
It turned out I have to do the following steps
go to https://www.dropbox.com/s/rpn6yersv06tttz/gnuplot-4.2.5-i386.dmg
download the gnuplot-4.2.5-i386.dmg
open the resulting DMG file
open the gnuplot-4.2.3 DMG the Extras folder
drop Gnuplot.app into your applications folder
go to /usr/bin in terminal and do
$ sudo ln -sf "/Applications/Gnuplot.app/Contents/Resources/bin/
gnuplot"
You will be prompted to install X11 if you haven't done so, but after that if you run sample line like
python easy.py svmguide1 svmguide1.t
it should work. The sample files can be downloaded at http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#svmguide1
references: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
Make sure Homebrew is installed, then just run:
brew install gnuplot
Link the executable, so that it is in the PATH (i.e. /usr/bin) and can be found by the Python scripts:
sudo ln -s /opt/local/bin/gnuplot /usr/bin/gnuplot
After that's done, libsvm's Python scripts should not complain any longer.
Since macOS high sierra, /usr/bin is not modifyable by the user anymore, gnuplot is installed at /usr/local/bin instead. Open easy.py and change the path from "/usr/bin" to "/usr/local/bin"

MongoDB installed via Homebrew not working

I installed MongoDB via Homebrew (following http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/) but it's not working.
Typing mongod at shell prompt gives me:
-bash: mongod: command not found
Not sure if I need to add something for Homebrew to my PATH env var?
I can see Mongo is installed under /usr/local/Cellar/mongodb – but am assuming I don't need to add everything I install via homebrew to the path? Also, assuming I can run mongod from any directory or am I actually meant to be in install directory?
When I run brew doctor I get:
Warning: You have unlinked kegs in your Cellar
Followed by a list of 3 items which includes MongoDB – but I'm not sure how I'm meant to link them?
Works perfectly
brew update
brew tap mongodb/brew
brew install mongodb-community#4.2
For latest version, check https://docs.mongodb.com/manual/release-notes/
You're getting this error because your 'brew' install failed to create the correct symlinks in /usr/local/bin. As a result, the shell can't find the mongo executables in your $PATH. You can fix this using the following steps:
Check the permissions on /usr/local/bin and make sure that you own that directory and have write permissions on it
$ ls -ld /usr/local/bin
Once you've fixed that, run 'brew link' to fix the symlinks
$ brew link mongodb
If you are on mongodb-community#4.0. You can try to reinstall with brew reinstall mongodb-community#4.0.
Then I get the following hint:
==> Caveats
mongodb-community#4.0 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have mongodb-community#4.0 first in your PATH run:
echo 'export PATH="/usr/local/opt/mongodb-community#4.0/bin:$PATH"' >> ~/.bash_profile
So you can just copy the echo command and restart your shell!
Copied from a different channel running these commands in the terminal updated the installation/configuration issues as described in OP
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community
I faced the same problem and this solution seemed to work for me. I had previously uninstalled mongodb and reinstalled it through homebrew which gave me a bunch of problems. This solution seemed to work just fine.
brew uninstall --force mongodb
brew cleanup -s mongodb
brew cleanup --prune-prefix
brew install mongodb
It works from the directory since the sh searches the ENV path and then the cwd for a program named mongod. I have been looking around a little and it seems that the default install of MongoDB (I am not a Mac user) does not install a rc or init script for which sh to understand it's running behaviour as stated here:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/#using-mongodb-from-homebrew-and-macports
The packages installed with Homebrew and MacPorts contain no control
scripts or interaction with the system’s process manager.
If you have configured Homebrew and MacPorts correctly, including
setting your PATH, the MongoDB applications and utilities will be
accessible from the system shell. Start the mongod process in a
terminal (for testing or development) or using a process management
tool.
So you must actually define (as you said) MongoDBs path, here is an example: https://snipt.net/sido/installing-mongodb-on-os-x/
Edit: the example is not mine. I just stole it from it's user: https://snipt.net/sido/

How to create .deb packages on Mac OS X

I am trying to upload my app on Cydia and it requires .deb package. I am unable to figure out how to make .deb packages on mac. I am using 10.6.3 when I write this command on terminal
dpkg-deb -b MyProgram
Terminal output is
-bash: dpkg-deb: command not found
I've install fink, Mac ports insert Mac DVD to find out but nothing helps.
It's available on Homebrew:
brew install dpkg
If you don't have Homebrew installed, go to brew.sh. It's a simple one-liner to install.
Homebrew is less invasive, less complicated, and more popular than Macports or similar.
I installed mac ports 1.7 through terminal as no package is available.
After that I installed Mac ports 1.9 through installer.
Then goto this path /opt/local/bin and run sudo port selfupdate
after that execute sudo port install dpkg
it will take some time and after that your dpkg is successfully configured.
Run this command sudo dpkg-deb -b MyProgram to make MyProgram.deb
Note MyProgram should contain DEBIAN folder and under that control file remove txt extention
Below is control file
Website: www.zeeshanullah.com
Maintainer: zeeshanullah <zzeeshann#gmail.com>
Name: Snapture
Package: zeeshanullah
Section: zeeshanullah
Version: 2.x.x
Architecture: iphoneos-arm
Description: GPS joke.
Sponsor: zeeshanullah.com <zeeshanullah>
dont forget to place a new line at the end of control file otherwise you will get an error.
You need Xcode installed on your system before using mac ports - you find it on the second mac DVD, I think. After that, you can install mac ports and then via the Terminal type "sudo port install dpkg", press return and enter your password. It may take some time to compile. You tried that?
Best option is to use FPM and you can create it in 50 secs:
fpm
i think these links can be useful for you:
How to make a deb on mac
Using ant to create deb

Resources