EC2 Installation Issues

51 views
Skip to first unread message

Ferreira Foundation

unread,
Nov 7, 2024, 10:52:47 PM11/7/24
to Sahana-Eden
Hello,

I am following the guide at https://eden.sahanafoundation.org/wiki/InstallationGuidelines/Amazon and I am getting stuck on some issues with installation.

I have Debian 12 running on a T2.micro instance.

I tried using the User Data function to add the contents of the user-data.sh file for the install which did not work and now I am trying to run the script manually.

I have already configured SES for email for the domain we are using which is ResponseLink.org.

First Issue:

I got stuck on step 13.5  because Exim4 was not installed so I went back to try to run the user-data.sh script manually.

Second Issue:

Trying to run -

"exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1"
I get the following output:

"-bash: /dev/console: Permission denied

tee: /var/log/user-data.log: Permission denied

Connection to (ip redacted) closed."

Third Issue:

Trying to run -

"apt-get update"

I get the following output:

"Reading package lists... Done

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)

E: Unable to lock directory /var/lib/apt/lists/

W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)

W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)"



I stopped with trying to continue with any of the setup there. Not sure what I'm missing or doing wrong.

Any help would be greatly appreciated.

Thank You,


-Chris

Ferreira Foundation

unread,
Nov 7, 2024, 11:39:45 PM11/7/24
to Sahana-Eden
I was able to get a little further and overcome some permissions issues with sudo -i to run as root, but here is what I'm running into now which is issues with Python and Ansible packages. I have tried to install Python3-pip and the Dev package and this is where I'm stuck:


admin@ip-:~$ sudo apt-get update

Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [38 B]

Get:5 file:/etc/apt/mirrors/debian-security.list Mirrorlist [47 B]

Hit:2 https://cdn-aws.deb.debian.org/debian bookworm InRelease

Get:3 https://cdn-aws.deb.debian.org/debian bookworm-updates InRelease [55.4 kB]

Get:4 https://cdn-aws.deb.debian.org/debian bookworm-backports InRelease [59.0 kB]

Hit:6 https://cdn-aws.deb.debian.org/debian-security bookworm-security InRelease

Get:7 https://cdn-aws.deb.debian.org/debian bookworm-backports/main Sources.diff/Index [63.3 kB]

Get:8 https://cdn-aws.deb.debian.org/debian bookworm-backports/main Sources T-2024-11-08-0204.39-F-2024-11-08-0204.39.pdiff [33 B]

Get:8 https://cdn-aws.deb.debian.org/debian bookworm-backports/main Sources T-2024-11-08-0204.39-F-2024-11-08-0204.39.pdiff [33 B]

Fetched 178 kB in 0s (505 kB/s)

Reading package lists... Done

admin@ip-:~$ sudo exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1

admin@ip-:~$ -bash: /dev/console: Permission denied

tee: /var/log/user-data.log: Permission denied


admin@ip-:~$ sudo -i

root@ip-:~# exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1

admin@ip-:~$ sudo -i


root@ip-:~# apt-get install python3-pip

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following additional packages will be installed:

  binutils binutils-common binutils-x86-64-linux-gnu build-essential bzip2 cpp cpp-12 dirmngr dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++

  g++-12 gcc gcc-12 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm javascript-common libabsl20220623

  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libaom3 libasan8 libassuan0 libatomic1 libavif15 libbinutils libc-dev-bin

  libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdav1d6 libde265-0 libdeflate0 libdpkg-perl libexpat1-dev libfakeroot

  libfile-fcntllock-perl libfontconfig1 libgav1-1 libgcc-12-dev libgd3 libgomp1 libgprofng0 libheif1 libisl23 libitm1 libjansson4 libjbig0

  libjpeg62-turbo libjs-jquery libjs-sphinxdoc libjs-underscore libksba8 liblerc4 liblocale-gettext-perl liblsan0 libmpc3 libmpfr6 libnpth0 libnsl-dev

  libpython3-dev libpython3.11 libpython3.11-dev libquadmath0 librav1e0 libstdc++-12-dev libsvtav1enc1 libtiff6 libtirpc-dev libtsan2 libubsan1

  libwebp7 libx11-6 libx11-data libx265-199 libxau6 libxcb1 libxdmcp6 libxpm4 libyuv0 linux-libc-dev make manpages-dev pinentry-curses python3-dev

  python3-distutils python3-lib2to3 python3-setuptools python3-wheel python3.11-dev rpcsvc-proto zlib1g-dev

Suggested packages:

  binutils-doc bzip2-doc cpp-doc gcc-12-locales cpp-12-doc dbus-user-session pinentry-gnome3 tor debian-keyring g++-multilib g++-12-multilib gcc-12-doc

  gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-12-multilib parcimonie xloadimage scdaemon apache2 | lighttpd | httpd glibc-doc bzr

  libgd-tools libstdc++-12-doc make-doc pinentry-doc python-setuptools-doc

The following NEW packages will be installed:

  binutils binutils-common binutils-x86-64-linux-gnu build-essential bzip2 cpp cpp-12 dirmngr dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++

  g++-12 gcc gcc-12 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm javascript-common libabsl20220623

  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libaom3 libasan8 libassuan0 libatomic1 libavif15 libbinutils libc-dev-bin

  libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdav1d6 libde265-0 libdeflate0 libdpkg-perl libexpat1-dev libfakeroot

  libfile-fcntllock-perl libfontconfig1 libgav1-1 libgcc-12-dev libgd3 libgomp1 libgprofng0 libheif1 libisl23 libitm1 libjansson4 libjbig0

  libjpeg62-turbo libjs-jquery libjs-sphinxdoc libjs-underscore libksba8 liblerc4 liblocale-gettext-perl liblsan0 libmpc3 libmpfr6 libnpth0 libnsl-dev

  libpython3-dev libpython3.11 libpython3.11-dev libquadmath0 librav1e0 libstdc++-12-dev libsvtav1enc1 libtiff6 libtirpc-dev libtsan2 libubsan1

  libwebp7 libx11-6 libx11-data libx265-199 libxau6 libxcb1 libxdmcp6 libxpm4 libyuv0 linux-libc-dev make manpages-dev pinentry-curses python3-dev

  python3-distutils python3-lib2to3 python3-pip python3-setuptools python3-wheel python3.11-dev rpcsvc-proto zlib1g-dev

0 upgraded, 106 newly installed, 0 to remove and 0 not upgraded.

Need to get 98.8 MB of archives.

After this operation, 383 MB of additional disk space will be used.

Do you want to continue? [Y/n] yes

THEN THE PACKAGE INSTALLS, will spare you that...

root@ip-:~# apt-get install python-dev-is-python3

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following additional packages will be installed:

  python-is-python3

The following NEW packages will be installed:

  python-dev-is-python3 python-is-python3

0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

Need to get 4592 B of archives.

After this operation, 29.7 kB of additional disk space will be used.

Do you want to continue? [Y/n] y

Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [38 B]

Get:2 https://cdn-aws.deb.debian.org/debian bookworm/main amd64 python-is-python3 all 3.11.2-1+deb12u1 [3216 B]

Get:3 https://cdn-aws.deb.debian.org/debian bookworm/main amd64 python-dev-is-python3 all 3.11.2-1+deb12u1 [1376 B]

Fetched 4592 B in 0s (56.4 kB/s)           

Selecting previously unselected package python-is-python3.

(Reading database ... 42585 files and directories currently installed.)

Preparing to unpack .../python-is-python3_3.11.2-1+deb12u1_all.deb ...

Unpacking python-is-python3 (3.11.2-1+deb12u1) ...

Selecting previously unselected package python-dev-is-python3.

Preparing to unpack .../python-dev-is-python3_3.11.2-1+deb12u1_all.deb ...

Unpacking python-dev-is-python3 (3.11.2-1+deb12u1) ...

Setting up python-is-python3 (3.11.2-1+deb12u1) ...

Setting up python-dev-is-python3 (3.11.2-1+deb12u1) ...

Processing triggers for man-db (2.11.2-2) ...

root@ip-:~# cd eden_deploy

root@ip-:~/eden_deploy# bash bootstrap_coapp.sh

running on Debian version 12

running on EC2

using hostname ec2-98-83-241-119.compute-1.amazonaws.com

Reading package lists...

Building dependency tree...

Reading state information...

Package python-pip is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

However the following packages replace it:

  python3-pip


Package python-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

However the following packages replace it:

  python-dev-is-python3


E: Package 'python-pip' has no installation candidate

E: Package 'python-dev' has no installation candidate

error: externally-managed-environment


× This environment is externally managed

╰─> To install Python packages system-wide, try apt install

    python3-xyz, where xyz is the package you are trying to

    install.

    

    If you wish to install a non-Debian-packaged Python package,

    create a virtual environment using python3 -m venv path/to/venv.

    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make

    sure you have python3-full installed.

    

    If you wish to install a non-Debian packaged Python application,

    it may be easiest to use pipx install xyz, which will manage a

    virtual environment for you. Make sure you have pipx installed.

    

    See /usr/share/doc/python3.11/README.venv for more information.


note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.

hint: See PEP 668 for the detailed specification.

error: externally-managed-environment


× This environment is externally managed

╰─> To install Python packages system-wide, try apt install

    python3-xyz, where xyz is the package you are trying to

    install.

    

    If you wish to install a non-Debian-packaged Python package,

    create a virtual environment using python3 -m venv path/to/venv.

    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make

    sure you have python3-full installed.

    

    If you wish to install a non-Debian packaged Python application,

    it may be easiest to use pipx install xyz, which will manage a

    virtual environment for you. Make sure you have pipx installed.

    

    See /usr/share/doc/python3.11/README.venv for more information.


note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.

hint: See PEP 668 for the detailed specification.

Now running ansible-playbook

bootstrap_coapp.sh: line 90: /usr/local/bin/ansible-playbook: No such file or directory

root@ip-:~/eden_deploy# cd eden_deploy

-bash: cd: eden_deploy: No such file or directory

root@ip-:~/eden_deploy# ls

README.md  bootstrap.sh  bootstrap_coapp.sh  deploy_coapp.yml  library roles  tools  user-data.sh

root@ip-:~/eden_deploy# 



Reply all
Reply to author
Forward
0 new messages