Homebrew specific version of sshuttle - installation

While I was trying to install the older version of Sshutle,
I am trying to install sshuttle version 0.78.5 and using this command:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb
I am getting this error:
Calling Installation of sshuttle from a GitHub commit URL is disabled!
Use 'brew extract sshuttle' to stable tap on GitHub instead.
How do I enable the command?

Use of brew extract is not trivial. I think simplest solution for you is to execute:
curl --silent \
https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb \
--output sshuttle.rb
brew install ./sshuttle.rb

Related

Error: No head is defined for smpeg

I am trying to install SimpleCV, I am following the instructions here (https://github.com/sightmachine/SimpleCV#mac-os-x-106-and-above).
But when I try to install smpeg, using these commands:
brew tap homebrew/headonly
brew install --HEAD smpeg
I am getting this error:
Error: No head is defined for smpeg
I have tried to wait and run the command again but that did not work.
These instructions are outdated.
--HEAD is used to install a formula’s HEAD, i.e. the latest commit on its Git/SVN/etc repository. This option has been removed from smpeg, hence the error message. Using brew install smpeg is now sufficient.
I submitted a PR to fix these.
UPDATE
I removed --HEAD then it worked. I don't know why.

I cannot install aws cli on mac os with pip - awscli: command not found

I tried to follow this tutorial.
This is what I did in the console:
pip3 install --user --upgrade awscli
after that, when I write:
pip3 --version
I'm getting:
pip 9.0.1 from /Users/user/Library/Python/3.4/lib/python/site-packages (python 3.4)
then I wrote:
pip3 install --user --upgrade awscli
this command downloaded awscli and automatically added this:
# Setting PATH for Python 3.4
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
to my .profile
Later on, just to be sure, I wrote:
source ~/.profile
and then when I type:
user$ aws
-bash: aws: command not found
I restarted the terminal with no luck also.
What's the problem here?
Here are the two steps to install AWS cli on mac OSX
FIRST
Offical version
brew install awscli
SECOND
Development version
brew install awscli --HEAD
When "pip3 install" is called with the "--user" option, it installs the aws executable in a user-specific location. This can be one of many possible locations, but the best way to find out where is with this command:
python3 -m site --user-base
On my system, this returned:
/Users/[myusername]/Library/Python/3.6
This directory has a "bin" subdirectory, and that is where the "aws" executable was located.
I figured this out from following:
pip3 install --help
https://docs.python.org/3/library/site.html#module-contents
Simple do these three steps:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
brew install awscli should work
This is what worked for me, I experienced permission issues and had to create a local Frameworks folder first before running brew install. using macOS High Sierra
sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks
brew install awscli
To answer the original question about installing using pip:
sudo pip install --upgrade pip
sudo easy_install nose
sudo easy_install tornado
sudo easy_install six
sudo pip install --ignore-installed awscli
worked for me on Mojave
I had similar error, when trying to install awscli. I was following steps mentioned here by amazon [https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html]
I use anaconda, so when I was using pip3 install awscli --upgrade --user
it installs awscli in /Users/username/.local/lib/python3.6/
So, I used following to update awscli to anaconda-
conda install -c conda-forge awscli
I have used the following commands to install awscli :
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws
check version using : /Users/xxx/bin/aws --version
configure using : /Users/xxx/bin/aws configure
Was facing a similar issue. Resolved it by installing python 3.9 using brew install.
brew install python#3.9
Then reinstall awscli
I followed the below steps and it works for MacOS 10.11
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
Unzip the package.
unzip awscli-bundle.zip
And instead of given command:
'sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws'
which is broken due to pip, I think, I used the below command and it worked for me.
python3.6 ./awscli-bundle/install -b ~/bin/aws

Trouble installing m2crypto with pip on OS X / macOS

pip install m2crypto
Generates the following output:
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -I/usr/include/openssl -includeall -modern -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_m2crypto.i:30: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:33: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
I've run:
brew install swig
I wanted a nicer way without installing manually and using only Homebrew (which also does not link openssl by default). Also using pip was a requirement. This seems to work with newest m2crypto 0.22.5. I also tested it once with m2crypto 0.22.3 and seems also to work. The OpenSSL version here is 1.0.2d:
brew install openssl
brew install swig
Finally install m2crypto on macOS in your Bash. It is a long command but it changes SWIG and clang environment variables only during pip install so that m2crypto will get all OpenSSL requirements:
env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
pip install m2crypto
btw. the last command also works if you use e.g. a requirements.txt.
Update:
Additional also the command for fish shell users...
env LDFLAGS="-L"(brew --prefix openssl)"/lib" \
CFLAGS="-I"(brew --prefix openssl)"/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I"(brew --prefix openssl)"/include" \
pip install m2crypto
thanks to therealmarv env flags i was able to get this to work with the macports version of openssl/swig, this is what i did:
sudo port install openssl
sudo port install swig
sudo port install swig-python
then use therealmarv lines but replace "$(brew --prefix openssl)" with the dir from macports which should be "/opt/local"
sudo env LDFLAGS="-L/opt/local/lib" \
CFLAGS="-I/opt/local/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I/opt/local/include" \
pip install M2Crypto
I just went through a lot of pain getting this working in El Capitan. Here is what I had to do:
Install OpenSSL (you have to use an older version, m2crypto will not compile otherwise)
curl -O https://www.openssl.org/source/openssl-0.9.8zg.tar.gz
tar -xvzf openssl-0.9.8zg.tar.gz
cd openssl-0.9.8zg
./Configure --prefix=/usr/local darwin64-x86_64-cc
make && make test
sudo make install
Install m2crypto
git clone https://github.com/martinpaljak/M2Crypto.git
cd M2Crypto
python setup.py build build_ext --openssl=/usr/local
sudo python setup.py install build_ext --openssl=/usr/local
AFAIK it is installed... I still have to do some testing though.
Got exact same issue on Ubuntu 18.04 LTS, while trying to execute
pip install M2Crypto==0.24.0
Did the following to get rid of it:
sudo apt-get install swig
sudo apt-get install libssl1.0-dev
This fixed my problem (Python 2.7):
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
macos v10.15.6
m2crypto v0.35.6
pip v20
Solution by therealmarv works,
If the program does not take effect, you can try to upgrade your brew packages. Before the solution.
brew update # update homebrew self
brew upgrade # upgrade all
sudo apt-get install python-m2crypto

SFTP Support for curl on OSX

I am trying to get SFTP support for curl in OSX. I installed curl via
$ brew install curl --with-ssh
and I also symlinked the homebrew version to the /usr/bin via
$ sudo ln -s /usr/local/bin/curl /usr/bin/curl
But I am still getting a
curl: (1) Protocol sftp not supported or disabled in libcurl
when using
$ curl sftp://some.host.com/path/to/file
My endeavor is connected to an issue for the awesome git-ftp https://github.com/resmo/git-ftp/issues/146
What am I doing wrong?
run 'curl -V' and see if SFTP is listed as a supported protocol.
If it isn't, curl needs to be rebuilt with libssh2 to get the support built-in.
Since the --with-libssh2 option was removed from brew, this is the way to go:
brew install curl-openssl
Be aware:
curl is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have curl first in your PATH, run:
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc
or call it directly by using:
/usr/local/opt/curl/bin/curl ...
If you are on a mac you will have to run this to enable first:
brew install curl --with-libssh2

Couch DB installation not working on Mac OSx Lion

I had a problem installing Couch DB on mac OSx Lion using Homebrew.
I execute the command
brew install couchdb
but then I have have a problem with mmd5 on file
~/Library/Caches/Homebrew/spidermonkey-1.8.5.tar.gz
How can I proceed?
UPDATE
I found out how to fix the problem:
you have to remove the file
rm ~/Library/Caches/Homebrew/spidermonkey-1.8.5.tar.gz
and update your Homebrew by running
brew update
you might have git problem here (as I had) to resolve it reset all local homebrew changes by running
git reset --hard
git clean -f -x -d
and run
brew update
and now it should be straight forward to install couchdb
brew install couchdb
(if you are running LION):
brew install -v couchdb
to runn it type
couchdb

Resources