{"id":2764,"date":"2024-09-11T22:36:40","date_gmt":"2024-09-11T22:36:40","guid":{"rendered":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2764"},"modified":"2024-09-11T22:41:57","modified_gmt":"2024-09-11T22:41:57","slug":"install-awscli2-on-freebsd-14-1-p3","status":"publish","type":"post","link":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2764","title":{"rendered":"Install awscli2 on FreeBSD 14.1-p3"},"content":{"rendered":"<p>Whilst I often use the awscli on Linux or mac for which there are <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-install.html\">binary installers<\/a>, I also tend to work on personal projects on FreeBSD. Unfortunately this OS is not supported by AWS. Some would recommend to <a href=\"https:\/\/layer77.net\/2023\/04\/07\/installing-aws-cli-tools-v2-on-freebsd-12-4\">use the Linuxulator<\/a> but surely running a native version would be better. So here is a quick step-through of how I got it running on FreeBSD 14.1-p3 with python311 thanks mostly to <a href=\"https:\/\/github.com\/aws\/aws-cli\/discussions\/7168\">this github issue<\/a> and also <a href=\"https:\/\/github.com\/aws\/aws-cli\/issues\/7942\">this one<\/a>. Although this is done with <i>python311<\/i> and <i>py311-pip<\/i>, you can probably use the same method for older version of python down to <i>python39<\/i>.<\/p>\n<p>First we need to clone <i>awscli2<\/i> from <a href=\"https:\/\/github.com\/aws\/aws-cli\">https:\/\/github.com\/aws\/aws-cli<\/a>. Be careful to select the <b>v2<\/b> branch.<\/p>\n<pre>\r\ngit clone https:\/\/github.com\/aws\/aws-cli.git\r\ncd aws-cli\r\ngit checkout v2\r\n<\/pre>\n<p>Then, I ran into a problem with pyOpenSSL. After installing it, executing awscli returned the following error message: <code>ERR_UNABLE_TO_GET_ISSUER_CERT = _lib.X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT<\/code>. Thanks to <a href=\"https:\/\/github.com\/aws\/aws-cli\/issues\/7942\">this other issue<\/a>, it seems like a quick solution was to downgrade the version of pyOpenSSL (but this step might not be necessary to you, future reader blessed with a fix):<\/p>\n<pre>\r\nsudo pip install pyOpenSSL==23.1.0\r\n<\/pre>\n<p>Then it&#8217;s a matter of installing the requirements and building\/installing the command line tool (note that it needs <i>gcc<\/i> tho, in my case <i>gcc13-13.3.0<\/i>):<\/p>\n<pre>\r\nsudo pip install -r requirements.txt\r\nsudo CC=\/usr\/local\/bin\/gcc pip install -e .\r\n<\/pre>\n<p>And tada!<\/p>\n<pre>\r\n\u00bb aws --version\r\naws-cli\/2.17.49 Python\/3.11.9 FreeBSD\/14.1-RELEASE-p3 source\/amd64\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Whilst I often use the awscli on Linux or mac for which there are binary installers, I also tend to work on personal projects on FreeBSD. Unfortunately this OS is not supported by AWS. Some would recommend to use the &hellip; <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=2764\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[1159,1160,1158,389],"class_list":["post-2764","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-aws","tag-aws-cli","tag-awscli2","tag-freebsd"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2764"}],"version-history":[{"count":0,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2764\/revisions"}],"wp:attachment":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}