<p>This post is more of a personal notes. Recently, I had to run a script on my machine which until then was only run by one person in our office. The problem started with us having different <a href="https://www.openssl.org/" target="_blank" rel="nofollow noopener noreferrer">openssl</a> versions. I had <code class="language-text">LibreSSL</code> vs the other person had <code class="language-text">OpenSSL</code>.</p>n<p>This started creating one problem after the other. For example the script passed in <code class="language-text">pbkdf2</code> argument into the <code class="language-text">openssl</code> cipher and this wasn’t supported in <code class="language-text">LibreSSL</code><a href="https://stackoverflow.com/questions/61938795/openssl-pbkdf2-option-no-longer-supported" target="_blank" rel="nofollow noopener noreferrer">Link</a></p>n<p>I updated <code class="language-text">openssl</code> to the correct version to support the above mentioned <code class="language-text">pbkdf2</code> cipher; the next error was the following <code class="language-text">Error: No available formula with the name "python@2"</code></p>n<p>I tried to reinstall python@2 like <a href="https://stackoverflow.com/a/63725223/2672494" target="_blank" rel="nofollow noopener noreferrer">this</a>.</p>n<p>This fixed the openssl error, but the <code class="language-text">awscli</code> was broken and got the following error <code class="language-text">ERROR:root:code for hash md5 was not found.</code></p>n<blockquote>n<p>As of Feb. 10, 2020, python@2 was removed from homebrew.</p>n</blockquote>n<p>I followed the steps mentioned <a href="https://stackoverflow.com/a/59816812/2672494" target="_blank" rel="nofollow noopener noreferrer">here</a>, but <code class="language-text">awscli</code> was still broken.</p>n<p>I updated the <code class="language-text">awscli</code> to <a href="https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html#cliv2-mac-install-cmd" target="_blank" rel="nofollow noopener noreferrer">version 2</a>.</p>n<p>Then I tried to add <code class="language-text">awscli</code> to the <code class="language-text">PATH</code> as mentioned <a href="https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html#awscli-install-osx-path" target="_blank" rel="nofollow noopener noreferrer">here</a></p>n<p><code class="language-text">awscli</code> and <code class="language-text">openssl</code> were both fixed, but now I had to upgrade all <code class="language-text">awscli</code> commands to the version 2.</p>n<p>For example: <code class="language-text">aws ecr get-login-password</code> <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth" target="_blank" rel="nofollow noopener noreferrer">link to connect to docker</a></p>n<p>It took me one and a half days to finally have the script running on my machine too. I hope this post helps someone.</p>n <div style="margin-top=55px; font-style: italic;">(This is an article posted to my blog at princiya.com/blog. You can read it online by <a href="https://atomic-temporary-42700218.wpcomstaging.com/blog/fix-openssl-python-aws/">clicking here</a>.)</div>
Categorised as: Uncategorized
Managing pythons on MacOS
1–2 minutes





Leave a comment