When I run any Ansible command the response is always abort. For example:
ansible --version
# Or:
ansible-playbook -i production site.yml --diff --check
Response:
[1] 78576 abort ansible --version
Any idea why or how to fix? I updated Ansible but error remained the same. Things used to work in the past but it's been a few months since I've used Ansible.
I found the solution to my problem here. It's a problem with OpenSSL:
https://nbari.com/post/python-quit-unexpectedly-macos/
The steps to fix:
brew reinstall openssl
cd /usr/local/lib
sudo ln -s /usr/local/opt/openssl/lib/libssl.dylib libssl.dylib
sudo ln -s /usr/local/opt/openssl/lib/libcrypto.dylib libcrypto.dylib
This looks like something specific on your system which has been misconfigured.
re-trace your steps which could’ve led to this error
Try to reinstall Python / Ansible
use ‘ps aux | grep ansible’ to see if there are other Ansible processes running
virtualenv?
worst case ; reinstall system
Related
I was trying to install Node.js on Ubuntu 16.04 with the help of the following instruction
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
I was confused to see sudo "bash -" without options specified. How it can be so?
This command line uses curl to download a script from Node's site. It then pipes it in to a new shell executed as root (thanks to the sudo), and the script contains all the actions required for installing Node.
How do I install the anaconda / miniconda without prompts on Linux command line?
Is there a way to pass -y kind of option to agree to the T&Cs, suggested installation location etc. by default?
can be achieved by bash miniconda.sh -b (thanks #darthbith)
The command line usage for this can only be seen with -h flag but not --help, so I missed it.
To install the anaconda to another place, use the -p option:
bash anaconda.sh -b -p /some/path
AFAIK pyenv let you install anaconda/miniconda
(after successful instalation)
pyenv install --list
pyenv install miniconda3-4.3.30
For a quick installation of miniconda silently I use a wrapper
script script that can be executed from the terminal without
even downloading the script. It takes the installation destination path
as an argument (in this case ~/miniconda) and does some validation too.
curl -s https://gist.githubusercontent.com/mherkazandjian/cce01cf3e15c0b41c1c4321245a99096/raw/03c86dae9a212446cf5b095643854f029b39c921/miniconda_installer.sh | bash -s -- ~/miniconda
Silent installation can be done like this, but it doesn't update the PATH variable so you can't run it after the installation with a short command like conda:
cd /tmp/
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -u
Here -b means batch/silent mode, and -u means update the existing installation of Miniconda at that path, rather than failing.
You need to run additional commands to initialize PATH and other shell init scripts, e.g. for Bash:
source ~/miniconda3/bin/activate
conda init bash
I installed youtube-dl with brew but it wasn't working... It kept saying connection refused. So, I tried to reinstall in using the curl command at - https://github.com/rg3/youtube-dl
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
Still didn't work... I tried uninstalling it like I did the first time with
brew remove youtube-dl
But that's obviously not working cause I didn't install it the second time with brew. I just want to remove it now.
Let analyse the command you install:
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
We can see the youtube-dl is install in our system path:
/usr/local/bin/youtube-dl
So, in here we can remove the path directly.
$rm -rf /usr/local/bin/youtube-dl
Maybe its not done yet, I used the command find if any remain path.
$sudo find / -name youtube-dl
After a few minutes waiting...There is no more remain youtube-dl in my mac. Cong!
I am working on a bash server setup script for ubuntu 14.03 LTS. For some of the commands the script is executing, it prompts the user to input 'yes/no' or 'Y/N'. For some of these commands I have been able to pass a flag to the command in question that will auto respond with a yes. For example: sudo apt-get install -y gcc doesn't prompt the user.
On the other hand, I can't seem to find a way to do this for
sudo gem source -a http://rubygems.org/.
It keeps prompting me with Do you want to add this insecure source? [yn].
So far I've tried the following:
yes | gem source -a http://rubygems.org/ which I found here
Any Suggestions?
First add this certificate via script in this folder: {rubyfolder}\lib\ruby\2.1.0\rubygems\ssl_certs
I realize that:
sudo -i
env
is different from:
sudo -i
sudo env
They are both sudo, why are they different?
In my case, I realize the PATHs are very different, so sometimes things can't run with "sudo blah" but it works when I first log into sudo, then run the command. (Like my other question #4976658)
There are expected differences, such as SUDO_USER, SUDO_UID, and SUDO_GID.
And then there is PATH.
When you run
sudo -i
env
you should expect root's PATH, but when you run
sudo -i
sudo env
you should expect a default PATH.
I think you will find that this is due to the "secure path" option, that both Ubuntu and Fedora have adopted.
I agree it's annoying. There are many other threads about this behavior. :-/
For example, see this stackoverflow thread:
sudo changes PATH - why?