Closed3

Cloud9の環境構築(初級編)

Shacchi_mebsShacchi_mebs

心の安寧のためにフォルダツリーにホームディレクトリ表示したい

左ペインのtoggletreeからfolderアイコンをクリックしてフォルダツリーを表示

フォルダツリー右上のsettingアイコン(歯車)をクリック
そのメニューの中からShow Home in Favoriteにチェック

これで安心、credentialsもマルチエディタで編集できるね

pythonコマンドは消え去り、そしてpython3だけが残った

そんなことは許さない

$echo 'alias python="python3"' >> ~/.bashrc

pyenvのインストール

$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv

いつもの通りgitからクローンする

ホントに入った?

$ ~/.pyenv/bin/pyenv --version
pyenv 2.3.35-7-g6e3b91a8

「はい」って言え

最新?

Path通った?

$ export PATH="$HOME/.pyenv/bin:$PATH"
$ pyenv --version
pyenv 2.3.35-7-g6e3b91a8

通ったら「通った」って言え

Shacchi_mebsShacchi_mebs

指定のバージョン入れて

$ pyenv install 3.8.18

Downloading Python-3.8.18.tar.xz...
-> https://www.python.org/ftp/python/3.8.18/Python-3.8.18.tar.xz
Installing Python-3.8.18...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ec2-user/.pyenv/versions/3.8.18/lib/python3.8/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems

BUILD FAILED (Amazon Linux 2023 using python-build 2.3.35-7-g6e3b91a8)

opensslのバージョンが悪い?確認する

$ openssl version
OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)

新しすぎ?

$ sudo yum install openssl11-devel
Last metadata expiration check: 1 day, 6:15:41 ago on Wed Jan 17 01:43:24 2024.
No match for argument: openssl11-devel

きな臭いのはこれら
https://qiita.com/tomomichelle/items/9ea1ab7aa24e2d3fcf67
https://docs.aws.amazon.com/ja_jp/linux/al2023/ug/relationship-to-fedora.html

AL2023 GA バージョンには、フェドーラ 34、35、36 のコンポーネントが含まれています。一部のコンポーネントは Fedora のコンポーネントと同じで、一部は変更されています。
fedoraに影響しているところがopensslのインストールに影響?
pyenv wikiにある AL2 用のインストールコマンド記載あるもこれでも無理
https://github.com/pyenv/pyenv/wiki#suggested-build-environment

 $ sudo yum install gcc make patch zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl11-devel tk-devel libffi-devel xz-devel
Last metadata expiration check: 1 day, 6:36:40 ago on Wed Jan 17 01:43:24 2024.
Package gcc-11.4.1-2.amzn2023.0.2.x86_64 is already installed.
Package make-1:4.3-5.amzn2023.0.2.x86_64 is already installed.
Package patch-2.7.6-14.amzn2023.0.2.x86_64 is already installed.
Package zlib-devel-1.2.11-33.amzn2023.0.5.x86_64 is already installed.
Package bzip2-1.0.8-6.amzn2023.0.2.x86_64 is already installed.
Package bzip2-devel-1.0.8-6.amzn2023.0.2.x86_64 is already installed.
Package readline-devel-8.1-2.amzn2023.0.2.x86_64 is already installed.
Package sqlite-3.40.0-1.amzn2023.0.3.x86_64 is already installed.
Package sqlite-devel-3.40.0-1.amzn2023.0.3.x86_64 is already installed.
No match for argument: openssl11-devel
Package tk-devel-1:8.6.10-6.amzn2023.0.2.x86_64 is already installed.
Package libffi-devel-3.4.4-1.amzn2023.0.1.x86_64 is already installed.
Package xz-devel-5.2.5-9.amzn2023.0.2.x86_64 is already installed.
Error: Unable to find a match: openssl11-devel

同じ現象発生

Shacchi_mebsShacchi_mebs
 $ openssl version
openssl: /lib64/libcrypto.so.3: version `OPENSSL_3.0.9' not found (required by openssl)

opensslのコマンドが相変わらず見当たらない
pushしてみるだけしてみる

amplify push function

✔ Are you sure you want to continue? (Y/n) · yes
PushResourcesFault: The provided token is malformed or otherwise invalid.
at AmplifyToolkit.pushResources (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-> internal/lib/extensions/amplify-helpers/push-resources.js:116:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.executeAmplifyCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/amplify-category-function/lib/index.js:277:5)
at async executePluginModuleCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:139:5)
at async executeCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:37:9)
at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:121:5)
An error occurred when pushing the function resource

前と違うエラー出すな

PushResourcesFault: The provided token is malformed or otherwise invalid.
不正なトークンってなんだ
アクセスキーとかもう一回入れてみる

$ aws configure
AWS Access Key ID [********************]: 
AWS Secret Access Key [********************]: 
Default region name [ap-northeast-1]: 
Default output format [None]: 

PushResourcesFault: The provided token is malformed or otherwise invalid.

意味ない。なんなん。

このスクラップは4ヶ月前にクローズされました