Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
2135 views
How to configure Postgres on Amazon Linux
Most tutorials were installing both postgresql and postgresql-server: ``` $ sudo yum install postgresql postgresql-server Installed: postgresql.x86_64 0:9.2.24-1.amzn2.0.1 postgresql-server.x86_64 0:9.2.24-1.amzn2.0.1 Dependency Installed: postgresql-libs.x86_64 0:9.2.24-1.amzn2.0.1 ``` The programs...
Most tutorials were installing both postgresql and postgresql-server:
$ sudo yum install postgresql postgresql-server

Installed:
  postgresql.x86_64 0:9.2.24-1.amzn2.0.1                         
  postgresql-server.x86_64 0:9.2.24-1.amzn2.0.1                        

Dependency Installed:
  postgresql-libs.x86_64 0:9.2.24-1.amzn2.0.1
The programs are installed here:
$ which psql
/usr/bin/psql


$ which postgres
/usr/bin/postgres
At this point, most tutorials go into initdb and pg_ctl start
$ cd '/usr/lib'

$ service postgresql initdb
Hint: the preferred way to do this is now "postgresql-setup initdb"

$ sudo postgresql-setup initdb
[sudo] password for CORP\layne.sadler: 
Initializing database ... OK


$ systemctl enable postgresql
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to usr/lib/systemd/system/postgresql.service.



$ systemctl start postgresql
[18:47:32]  /usr/bin ☯  systemctl status postgresql
● postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-03-05 18:47:32 EST; 7s ago
  Process: 25559 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
  Process: 25553 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
 Main PID: 25562 (postgres)
   CGroup: /system.slice/postgresql.service
           ├─25562 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
           ├─25564 postgres: logger process   
           ├─25566 postgres: checkpointer process   
           ├─25567 postgres: writer process   
           ├─25568 postgres: wal writer process   
           ├─25569 postgres: autovacuum launcher process   
           └─25570 postgres: stats collector process

$ passwd postgres
note: /usr/bin/postgres -D /var/lib/pgsql/data -p 5432 **STUCK**
$postgres
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.

$ psql
psql: FATAL:  role "CORP\layne.sadler" does not exist

$ sudo pg_ctl -D postgresql-setup initdb
pg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.

# can't seem to login as su despite other sudo commands working
Notes: - The OS claims to be rhel fedora centos but doesn't have the rhel-release libraries. - It seems like epel-release and dnf are blocked from install. - ^^^ postgres installation instructions want the above tools.
LayneSadler (148 rep)
Mar 5, 2020, 11:28 PM • Last activity: Jul 28, 2025, 05:04 PM
0 votes
1 answers
2161 views
How to make a Python module available to all users
We have a script that installs AWS CLI into Amazon Linux 2 (really many different distros, but AL2 is what I'm working with). It seems like mostly all of the components get installed, but not all of them stick when capturing an image and then deploying it to AWS Workspaces. How do we potentially get...
We have a script that installs AWS CLI into Amazon Linux 2 (really many different distros, but AL2 is what I'm working with). It seems like mostly all of the components get installed, but not all of them stick when capturing an image and then deploying it to AWS Workspaces. How do we potentially get all of the modules available for all users, even domain users, after it gets deployed? Here are some pictures of what the script does. enter image description here enter image description here enter image description here Here is the error that happens when we deploy the image to AWS Workspaces with a domain user. enter image description here
user6571907 (1 rep)
Dec 5, 2023, 05:55 PM • Last activity: May 29, 2025, 01:03 PM
1 votes
1 answers
452 views
Log all journald messages to AWS Cloudwatch
I'm migrating our existing Amazon Linux 2 servers to Amazon Linux 2023. One of the changes is that the AL2023 now uses journald for it's logging. I have the requirement to have all logging in AWS Cloudwatch. I've already enabled the normal cloudwatch agent for metrics and a few logfiles. This is wor...
I'm migrating our existing Amazon Linux 2 servers to Amazon Linux 2023. One of the changes is that the AL2023 now uses journald for it's logging. I have the requirement to have all logging in AWS Cloudwatch. I've already enabled the normal cloudwatch agent for metrics and a few logfiles. This is working as expected. For journald I've checked various options and decided to implement [journald-cloudwatch-logs](https://github.com/saymedia/journald-cloudwatch-logs) , as it looked the most promising. I've configured it but I have a problem: * The service starts successful, but I simply do not see any logging in cloudwatch. This is the config:
aws_region = "eu-central-1"
ec2_instance_id = "i-xxxxxxxxxx"
log_group = "LogGroup"
log_stream = "server01-systemctl"
state_file = "/var/lib/journald-cloudwatch-logs/state"
log_priority = "INFO"
I've checked journalctl but no errors or any other indication something is wrong. Also, because the normal cloudwatch agent logs successfully to another log stream I know the IAM permissions are fine. My questions: * How can I make journald-cloudwatch-logs to actually log to cloudwatch? Any help is greatly appreciated. Edit: I'm also open for other approached to log journald messages to cloudwatch
GetShifting (153 rep)
Apr 11, 2025, 09:21 AM • Last activity: Apr 18, 2025, 07:56 AM
1 votes
2 answers
4818 views
Successfully installed amazon-efs-utils but cannot find it
```` $ sudo yum install -y amazon-efs-utils --verbose Loading "extras_suggestions" plugin Loading "langpacks" plugin Loading "priorities" plugin Loading "update-mood" plugin Adding en_US to language list Config time: 0.391 Yum version: 3.4.3 rpmdb time: 0.000 Setting up Package Sacks amzn2-core pkgs...
`
$ sudo yum install -y amazon-efs-utils --verbose
Loading "extras_suggestions" plugin
Loading "langpacks" plugin
Loading "priorities" plugin
Loading "update-mood" plugin
Adding en_US to language list
Config time: 0.391
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
amzn2-core
pkgsack time: 0.052
Obs Init time: 0.172
Package amazon-efs-utils-1.29.1-1.amzn2.noarch already installed and latest version
Nothing to do
` Installation of amazon-efs-utils seems to be successful as shown above. But when I try to run the tool, I get this error:
`
$ sudo amazon-efs-utils
sudo: amazon-efs-utils: command not found
` 1. Is it possible that the URL from where amazon-efs-utils gets downloaded is blocked and hence it did not really get downloaded? 2. I ran yum with --verbose option to see if it would print a trace of which URL it tries to download the tool from. But it did not! Any idea how I can find which URL amazon-efs-utils would be downloaded from so that I can try whitelisting that URL on my server and try again? I am using Amazon Linux2 EC2 btw.
Biju (111 rep)
Mar 10, 2021, 03:06 AM • Last activity: Apr 12, 2025, 07:01 AM
1 votes
3 answers
2866 views
file: Compiled magic version [534] does not match with shared library magic version
I am running Amazon Linux centos however the version of the file which gets installed is 5.30. I require a later version. file: Compiled magic version [534] does not match with shared library magic version [530] steps to reproduce: wget -m ftp://ftp.astron.com/pub/file/file-5.34.tar.gz cd ftp.astron...
I am running Amazon Linux centos however the version of the file which gets installed is 5.30. I require a later version. file: Compiled magic version does not match with shared library magic version steps to reproduce: wget -m ftp://ftp.astron.com/pub/file/file-5.34.tar.gz cd ftp.astron.com/pub/file/ tar -zxf file-5.34.tar.gz cd file-5.34 ./configure --prefix=/usr make make install on my ubuntu machine, I can follow which involved removing libmagic before doing the install. What's the equivalent on centos / amazon linux? Or is there an easier way to yum install file 5.34 other than by compiling it?
bob dylan (151 rep)
Aug 3, 2018, 10:03 AM • Last activity: Apr 10, 2025, 12:00 PM
7 votes
2 answers
13493 views
Return the private IP of an EC2 instance from within the EC2 instance
What specific syntax can be used to return the private IP address of an Amazon Linux EC2 instance from the command line within that instance? So far, I have come up with the following: # Get private IP from inside the instance by filtering inside the following: instanceid=$(curl http://169.254.169.2...
What specific syntax can be used to return the private IP address of an Amazon Linux EC2 instance from the command line within that instance? So far, I have come up with the following: # Get private IP from inside the instance by filtering inside the following: instanceid=$(curl http://169.254.169.254/latest/meta-data/instance-id) echo $instanceid aws ec2 describe-instances --instance-id $instanceid --region us-west-2 However, as you can see if you type these commands inside an EC2 instance yourself, the above 3 lines result in a massive output, which would be a mess to filter through manually. Can someone suggest one or two lines of code to return simply the private ip of the instance and NO other information?
CodeMed (5357 rep)
Jun 8, 2019, 12:49 AM • Last activity: Apr 9, 2025, 01:38 PM
0 votes
0 answers
45 views
When I do tomcat restart in amazon ec2 linux then EBS space increases to 3-4GB
There are 5 servers in our autoscaling which are our live servers. Out of them 2 server facing out of storage issue related to Elastic block storage (EBS). So I have done research on which directory taking space what was the initial space just after initialization then till the out of memory issue c...
There are 5 servers in our autoscaling which are our live servers. Out of them 2 server facing out of storage issue related to Elastic block storage (EBS). So I have done research on which directory taking space what was the initial space just after initialization then till the out of memory issue come. Then again checked dir struc where space is gone ...Same struc is there not visible that any dir have taken 3 4 gb. but when one day I restarted my tomcat space increased to 3 4GB. I dont have any idea why its happening ? my tomcat service file location is /etc/system/systemd/tomcat.service. Then tomcat dir location is /usr/share/tomcat/ . I have removed unwanted files, packages to get 5-6GB out of 12gb of EBS. Then I used that LT to my autoscaling. Still after 4 5 or 7 days space becomes zero. Then I need to do manual autoscaling to get the new server with 4-5GB of space. I want its root cause of storage issue. Please help me. I tried to get the details of whole dir struc and space using df -h and du -h command. Then also noted down those dir struc with space after new initialization using command sudo du -h --max-depth=1 /opt/ | sort -rh* then again checked after 4 5 days but space not increased in any of the dir in whole ec2. Means there might be no physical files are accumulating on my server. For example at the start When i do check space Filesystem Size Used Avail Use% Mounted on devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 488K 3.9G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/nvme0n1p1 12G 6.4G 5.7G 53% / /dev/nvme0n1p128 10M 3.8M 6.2M 38% /boot/efi tmpfs 793M 0 793M 0% /run/user/1000 then after space becomes zero I am able to see only Filesystem Size Used Avail Use% Mounted on devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 488K 3.9G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/nvme0n1p1 12G 12G 20K 100% / /dev/nvme0n1p128 10M 3.8M 6.2M 38% /boot/efi tmpfs 793M 0 793M 0% /run/user/1000 and same dir struc i got when sapce was 5.6 GB arround . I am not able to find that any dir has taken that much space all were at the same size but the space was gone. But when i do tomcat restart space increases to 4-5GB again.
Nandkishor Bobade (1 rep)
Feb 11, 2025, 09:52 AM • Last activity: Feb 11, 2025, 12:23 PM
2 votes
1 answers
483 views
How can I install gcc10 in amazon linux 2023?
I am trying to install the NVIDIA driver and Cuda toolkit but it expects gcc10. Using p2.xlarge which has Tesla k80. And Tesla k80 supports Cuda toolkit 11.4 (https://www.nvidia.com/en-us/drivers/). Then from https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version, it says...
I am trying to install the NVIDIA driver and Cuda toolkit but it expects gcc10. Using p2.xlarge which has Tesla k80. And Tesla k80 supports Cuda toolkit 11.4 (https://www.nvidia.com/en-us/drivers/) . Then from https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version , it says that Cuda toolkit 11.4 requires gcc10. When I installed gcc using sudo yum groupinstall "Development Tools", it gave me gcc11. And AWS documentation says Amazon Linux 2023 does not support EPEL (https://docs.aws.amazon.com/linux/al2023/ug/compare-with-al2.html#epel) Is there any easy way to install gcc10, without building it from source ?
PSKP (131 rep)
Oct 2, 2024, 11:44 AM • Last activity: Dec 2, 2024, 12:28 PM
0 votes
0 answers
124 views
How to build gcc10 from source in Amazon Linux 2023? Getting version `GLIBCXX_3.4.29' not found
I am trying to install the NVIDIA driver and Cuda toolkit but it expects gcc10. Using p2.xlarge which has Tesla k80. And Tesla k80 supports Cuda toolkit 11.4 (https://www.nvidia.com/en-us/drivers/). Then from https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version, it says...
I am trying to install the NVIDIA driver and Cuda toolkit but it expects gcc10. Using p2.xlarge which has Tesla k80. And Tesla k80 supports Cuda toolkit 11.4 (https://www.nvidia.com/en-us/drivers/) . Then from https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version , it says that Cuda toolkit 11.4 requires gcc10. And AWS documentation says Amazon Linux 2023 does not support EPEL (https://docs.aws.amazon.com/linux/al2023/ug/compare-with-al2.html#epel) So I tried to build it from the source and took the steps below.
// Download source
wget https://ftp.gnu.org/gnu/gcc/gcc-10.5.0/gcc-10.5.0.tar.gz 

// extract files
tar -xf gcc-10.5.0.tar.gz

// installing gcc as configure expects some c compiler
// below command will install gcc11, which I don't want
sudo yum groupinstall "Development Tools"

// download prerequisites
./contrib/download_prerequisites

// create make file using configure
mkdir objdir
cd ../objdir
$PWD/../gcc-10.5.0/configure --prefix=$HOME/GCC-10.5.0 --enable-languages=c,c++,fortran,go --disable-multilib

// no building. this step gives error
make
Make command gives below error
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libstdc++-v3/python'
make: Entering directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libstdc++-v3'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/home/ec2-user/objdir/./gcc/xgcc -B/home/ec2-user/objdir/./gcc/" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2 -D_GNU_SOURCE" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=/home/ec2-user/gcc-10.5.0/missing makeinfo --split-size=5000000 --split-size=5000000 --split-size=5000000   " "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/home/ec2-user/GCC-10.5.0" "infodir=/home/ec2-user/GCC-10.5.0/share/info" "libdir=/home/ec2-user/GCC-10.5.0/lib" "includedir=/home/ec2-user/GCC-10.5.0/include" "prefix=/home/ec2-user/GCC-10.5.0" "tooldir=/home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu" "gxx_include_dir=/home/ec2-user/GCC-10.5.0/include/c++/10.5.0" "AR=ar" "AS=/home/ec2-user/objdir/./gcc/as" "LD=/home/ec2-user/objdir/./gcc/collect-ld" "RANLIB=ranlib" "NM=/home/ec2-user/objdir/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=nm" "DESTDIR=" "WERROR=" DO=all multi-do # make
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libstdc++-v3'
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libstdc++-v3'
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libstdc++-v3'
make: Entering directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp'
make  all-recursive
make: Entering directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp'
Making all in testsuite
make: Entering directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp/testsuite'
make: Nothing to be done for 'all'.
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp/testsuite'
make: Entering directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp'
/bin/sh ./libtool  --tag=CC   --mode=compile /home/ec2-user/objdir/./gcc/xgcc -B/home/ec2-user/objdir/./gcc/ -B/home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/bin/ -B/home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/lib/ -isystem /home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/include -isystem /home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/sys-include   -fno-checking -DHAVE_CONFIG_H -I. -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp  -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/config/linux/x86 -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/config/linux -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/config/posix -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/../include  -Wall -Werror -ftls-model=initial-exec -DUSING_INITIAL_EXEC_TLS -Wc,-pthread  -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c -o alloc.lo /home/ec2-user/objdir/../gcc-10.5.0/libgomp/alloc.c
libtool: compile:  /home/ec2-user/objdir/./gcc/xgcc -B/home/ec2-user/objdir/./gcc/ -B/home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/bin/ -B/home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/lib/ -isystem /home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/include -isystem /home/ec2-user/GCC-10.5.0/x86_64-pc-linux-gnu/sys-include -fno-checking -DHAVE_CONFIG_H -I. -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/config/linux/x86 -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/config/linux -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/config/posix -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp -I/home/ec2-user/objdir/../gcc-10.5.0/libgomp/../include -Wall -Werror -ftls-model=initial-exec -pthread -DUSING_INITIAL_EXEC_TLS -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c /home/ec2-user/objdir/../gcc-10.5.0/libgomp/alloc.c  -fPIC -DPIC -o .libs/alloc.o
/home/ec2-user/objdir/./gcc/cc1: /home/ec2-user/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/ec2-user/objdir/./gcc/cc1)
make: *** [Makefile:827: alloc.lo] Error 1
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp'
make: *** [Makefile:1057: all-recursive] Error 1
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp'
make: *** [Makefile:648: all] Error 2
make: Leaving directory '/home/ec2-user/objdir/x86_64-pc-linux-gnu/libgomp'
make: *** [Makefile:26932: all-stage1-target-libgomp] Error 2
make: Leaving directory '/home/ec2-user/objdir'
make: *** [Makefile:28732: stage1-bubble] Error 2
make: Leaving directory '/home/ec2-user/objdir'
make: *** [Makefile:1020: all] Error 2
PSKP (131 rep)
Oct 2, 2024, 12:33 PM
3 votes
1 answers
2321 views
Upgrade PCRE lib on AWS EC2 Linux AMI
I would like to update the default PCRE library of my AWS EC2 Linux instance. Current version is 8.21 2011-12-12. I tried with the following guides: https://forums.aws.amazon.com/thread.jspa?threadID=234930 https://www.mediawiki.org/wiki/Updating_to_PCRE_8.33_or_Higher The installation was successfu...
I would like to update the default PCRE library of my AWS EC2 Linux instance. Current version is 8.21 2011-12-12. I tried with the following guides: https://forums.aws.amazon.com/thread.jspa?threadID=234930 https://www.mediawiki.org/wiki/Updating_to_PCRE_8.33_or_Higher The installation was successful (make check returned all the OK test) but it seems that PHP is still not using the correct version of PCRE. I guess it is something related to the link step of the guide in which the 32 bit lib is liked instead of the 64 one used, but I am not very sure how to fix it. Apache and machine were rebooted after the installation. Any suggestion on how should I proceed with this? Thank you in advance *Additional info* $ uname -a Linux ip-10-0-3-82 4.9.75-25.55.amzn1.x86_64 #1 SMP Fri Jan 5 23:50:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ sudo yum install pcre Loaded plugins: priorities, update-motd, upgrade-helper amzn-main | 2.1 kB 00:00:00 amzn-updates | 2.5 kB 00:00:00 Package pcre-8.21-7.7.amzn1.x86_64 already installed and latest version Nothing to do $ pcretest -C PCRE version 8.41 2017-07-05 Compiled with 8-bit support UTF-8 support 16-bit support UTF-16 support 32-bit support UTF-32 support Unicode properties support No just-in-time compiler support Newline sequence is LF \R matches all Unicode newlines Internal link size = 2 POSIX malloc threshold = 10 Parentheses nest limit = 250 Default match limit = 10000000 Default recursion depth limit = 10000000 Match recursion uses stack $ ldd /usr/bin/php linux-vdso.so.1 => (0x00007ffe23d73000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff4cd67f000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff4cd465000) libedit.so.0 => /usr/lib64/libedit.so.0 (0x00007ff4cd236000) libncurses.so.5 => /lib64/libncurses.so.5 (0x00007ff4cd010000) libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007ff4ccdef000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff4cca6c000) libz.so.1 => /lib64/libz.so.1 (0x00007ff4cc856000) libpcre.so.0 => /lib64/libpcre.so.0 (0x00007ff4cc5fe000) librt.so.1 => /lib64/librt.so.1 (0x00007ff4cc3f6000) libm.so.6 => /lib64/libm.so.6 (0x00007ff4cc0f4000) libdl.so.2 => /lib64/libdl.so.2 (0x00007ff4cbef0000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007ff4cbcd7000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007ff4cb96f000) libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007ff4cb722000) libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007ff4cb43a000) libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007ff4cb207000) libcom_err.so.2 => /usr/lib64/libcom_err.so.2 (0x00007ff4cb004000) libssl.so.10 => /lib64/libssl.so.10 (0x00007ff4cad93000) libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007ff4ca935000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff4ca71f000) libc.so.6 => /lib64/libc.so.6 (0x00007ff4ca35b000) libfreebl3.so => /lib64/libfreebl3.so (0x00007ff4ca159000) /lib64/ld-linux-x86-64.so.2 (0x00007ff4cd8b6000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff4c9f3d000) liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007ff4c9d19000) libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007ff4c9b0b000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ff4c9908000) libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007ff4c96e7000) $ ll -ll /lib64 | grep pcre lrwxrwxrwx 1 root root 16 Nov 20 22:11 libpcre.so.0 -> libpcre.so.0.0.1 -rwxr-xr-x 1 root root 359688 May 27 2015 libpcre.so.0.0.1 $ sudo make install make install-am makeReferenced image: Entering directory `/home/ec2-user/pcre-8.41' make: Entering directory `/home/ec2-user/pcre-8.41' /bin/mkdir -p '/usr/lib' /bin/sh ./libtool --mode=install /usr/bin/install -c libpcre.la libpcre16.la libpcre32.la libpcreposix.la libpcrecpp.la '/usr/lib' libtool: install: /usr/bin/install -c .libs/libpcre.so.1.2.9 /usr/lib/libpcre.so.1.2.9 libtool: install: (cd /usr/lib && { ln -s -f libpcre.so.1.2.9 libpcre.so.1 || { rm -f libpcre.so.1 && ln -s libpcre.so.1.2.9 libpcre.so.1; }; }) libtool: install: (cd /usr/lib && { ln -s -f libpcre.so.1.2.9 libpcre.so || { rm -f libpcre.so && ln -s libpcre.so.1.2.9 libpcre.so; }; }) libtool: install: /usr/bin/install -c .libs/libpcre.lai /usr/lib/libpcre.la libtool: install: /usr/bin/install -c .libs/libpcre16.so.0.2.9 /usr/lib/libpcre16.so.0.2.9 libtool: install: (cd /usr/lib && { ln -s -f libpcre16.so.0.2.9 libpcre16.so.0 || { rm -f libpcre16.so.0 && ln -s libpcre16.so.0.2.9 libpcre16.so.0; }; }) libtool: install: (cd /usr/lib && { ln -s -f libpcre16.so.0.2.9 libpcre16.so || { rm -f libpcre16.so && ln -s libpcre16.so.0.2.9 libpcre16.so; }; }) libtool: install: /usr/bin/install -c .libs/libpcre16.lai /usr/lib/libpcre16.la libtool: install: /usr/bin/install -c .libs/libpcre32.so.0.0.9 /usr/lib/libpcre32.so.0.0.9 libtool: install: (cd /usr/lib && { ln -s -f libpcre32.so.0.0.9 libpcre32.so.0 || { rm -f libpcre32.so.0 && ln -s libpcre32.so.0.0.9 libpcre32.so.0; }; }) libtool: install: (cd /usr/lib && { ln -s -f libpcre32.so.0.0.9 libpcre32.so || { rm -f libpcre32.so && ln -s libpcre32.so.0.0.9 libpcre32.so; }; }) libtool: install: /usr/bin/install -c .libs/libpcre32.lai /usr/lib/libpcre32.la libtool: warning: relinking 'libpcreposix.la' libtool: install: (cd /home/ec2-user/pcre-8.41; /bin/sh "/home/ec2-user/pcre-8.41/libtool" --silent --tag CC --mode=relink gcc -fvisibility=hidden -g -O2 -version-info 0:5:0 -o libpcreposix.la -rpath /usr/lib libpcreposix_la-pcreposix.lo libpcre.la ) libtool: install: /usr/bin/install -c .libs/libpcreposix.so.0.0.5T /usr/lib/libpcreposix.so.0.0.5 libtool: install: (cd /usr/lib && { ln -s -f libpcreposix.so.0.0.5 libpcreposix.so.0 || { rm -f libpcreposix.so.0 && ln -s libpcreposix.so.0.0.5 libpcreposix.so.0; }; }) libtool: install: (cd /usr/lib && { ln -s -f libpcreposix.so.0.0.5 libpcreposix.so || { rm -f libpcreposix.so && ln -s libpcreposix.so.0.0.5 libpcreposix.so; }; }) libtool: install: /usr/bin/install -c .libs/libpcreposix.lai /usr/lib/libpcreposix.la libtool: warning: relinking 'libpcrecpp.la' libtool: install: (cd /home/ec2-user/pcre-8.41; /bin/sh "/home/ec2-user/pcre-8.41/libtool" --silent --tag CXX --mode=relink g++ -fvisibility=hidden -fvisibility-inlines-hidden -O2 -version-info 0:1:0 -o libpcrecpp.la -rpath /usr/lib libpcrecpp_la-pcrecpp.lo libpcrecpp_la-pcre_scanner.lo libpcrecpp_la-pcre_stringpiece.lo libpcre.la ) libtool: install: /usr/bin/install -c .libs/libpcrecpp.so.0.0.1T /usr/lib/libpcrecpp.so.0.0.1 libtool: install: (cd /usr/lib && { ln -s -f libpcrecpp.so.0.0.1 libpcrecpp.so.0 || { rm -f libpcrecpp.so.0 && ln -s libpcrecpp.so.0.0.1 libpcrecpp.so.0; }; }) libtool: install: (cd /usr/lib && { ln -s -f libpcrecpp.so.0.0.1 libpcrecpp.so || { rm -f libpcrecpp.so && ln -s libpcrecpp.so.0.0.1 libpcrecpp.so; }; }) libtool: install: /usr/bin/install -c .libs/libpcrecpp.lai /usr/lib/libpcrecpp.la libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/lib ---------------------------------------------------------------------- Libraries have been installed in: /usr/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /bin/mkdir -p '/usr/bin' /bin/sh ./libtool --mode=install /usr/bin/install -c pcretest pcregrep '/usr/bin' libtool: install: /usr/bin/install -c .libs/pcretest /usr/bin/pcretest libtool: install: /usr/bin/install -c .libs/pcregrep /usr/bin/pcregrep /bin/mkdir -p '/usr/bin' /usr/bin/install -c pcre-config '/usr/bin' /bin/mkdir -p '/usr/share/doc/pcre-8.41' /usr/bin/install -c -m 644 doc/pcre.txt doc/pcre-config.txt doc/pcregrep.txt doc/pcretest.txt AUTHORS COPYING ChangeLog LICENCE NEWS README '/usr/share/doc/pcre-8.41' /bin/mkdir -p '/usr/share/doc/pcre-8.41/html' /usr/bin/install -c -m 644 doc/html/NON-AUTOTOOLS-BUILD.txt doc/html/README.txt doc/html/index.html doc/html/pcre-config.html doc/html/pcre.html doc/html/pcre16.html doc/html/pcre32.html doc/html/pcre_assign_jit_stack.html doc/html/pcre_compile.html doc/html/pcre_compile2.html doc/html/pcre_config.html doc/html/pcre_copy_named_substring.html doc/html/pcre_copy_substring.html doc/html/pcre_dfa_exec.html doc/html/pcre_exec.html doc/html/pcre_free_study.html doc/html/pcre_free_substring.html doc/html/pcre_free_substring_list.html doc/html/pcre_fullinfo.html doc/html/pcre_get_named_substring.html doc/html/pcre_get_stringnumber.html doc/html/pcre_get_stringtable_entries.html doc/html/pcre_get_substring.html doc/html/pcre_get_substring_list.html doc/html/pcre_jit_exec.html doc/html/pcre_jit_stack_alloc.html doc/html/pcre_jit_stack_free.html doc/html/pcre_maketables.html doc/html/pcre_pattern_to_host_byte_order.html doc/html/pcre_refcount.html doc/html/pcre_study.html doc/html/pcre_utf16_to_host_byte_order.html doc/html/pcre_utf32_to_host_byte_order.html doc/html/pcre_version.html doc/html/pcreapi.html doc/html/pcrebuild.html doc/html/pcrecallout.html doc/html/pcrecompat.html doc/html/pcredemo.html doc/html/pcregrep.html '/usr/share/doc/pcre-8.41/html' /usr/bin/install -c -m 644 doc/html/pcrejit.html doc/html/pcrelimits.html doc/html/pcrematching.html doc/html/pcrepartial.html doc/html/pcrepattern.html doc/html/pcreperform.html doc/html/pcreposix.html doc/html/pcreprecompile.html doc/html/pcresample.html doc/html/pcrestack.html doc/html/pcresyntax.html doc/html/pcretest.html doc/html/pcreunicode.html '/usr/share/doc/pcre-8.41/html' /bin/mkdir -p '/usr/share/doc/pcre-8.41/html' /usr/bin/install -c -m 644 doc/html/pcrecpp.html '/usr/share/doc/pcre-8.41/html' /bin/mkdir -p '/usr/include' /usr/bin/install -c -m 644 pcreposix.h pcrecpp.h pcre_scanner.h '/usr/include' /bin/mkdir -p '/usr/share/man/man1' /usr/bin/install -c -m 644 doc/pcre-config.1 doc/pcregrep.1 doc/pcretest.1 '/usr/share/man/man1' /bin/mkdir -p '/usr/share/man/man3' /usr/bin/install -c -m 644 doc/pcre.3 doc/pcre16.3 doc/pcre32.3 doc/pcre_assign_jit_stack.3 doc/pcre_compile.3 doc/pcre_compile2.3 doc/pcre_config.3 doc/pcre_copy_named_substring.3 doc/pcre_copy_substring.3 doc/pcre_dfa_exec.3 doc/pcre_exec.3 doc/pcre_free_study.3 doc/pcre_free_substring.3 doc/pcre_free_substring_list.3 doc/pcre_fullinfo.3 doc/pcre_get_named_substring.3 doc/pcre_get_stringnumber.3 doc/pcre_get_stringtable_entries.3 doc/pcre_get_substring.3 doc/pcre_get_substring_list.3 doc/pcre_jit_exec.3 doc/pcre_jit_stack_alloc.3 doc/pcre_jit_stack_free.3 doc/pcre_maketables.3 doc/pcre_pattern_to_host_byte_order.3 doc/pcre_refcount.3 doc/pcre_study.3 doc/pcre_utf16_to_host_byte_order.3 doc/pcre_utf32_to_host_byte_order.3 doc/pcre_version.3 doc/pcreapi.3 doc/pcrebuild.3 doc/pcrecallout.3 doc/pcrecompat.3 doc/pcredemo.3 doc/pcrejit.3 doc/pcrelimits.3 doc/pcrematching.3 doc/pcrepartial.3 doc/pcrepattern.3 '/usr/share/man/man3' /usr/bin/install -c -m 644 doc/pcreperform.3 doc/pcreposix.3 doc/pcreprecompile.3 doc/pcresample.3 doc/pcrestack.3 doc/pcresyntax.3 doc/pcreunicode.3 doc/pcrecpp.3 '/usr/share/man/man3' /bin/mkdir -p '/usr/include' /usr/bin/install -c -m 644 pcre.h pcrecpparg.h pcre_stringpiece.h '/usr/include' /bin/mkdir -p '/usr/lib/pkgconfig' /usr/bin/install -c -m 644 libpcre.pc libpcreposix.pc libpcre16.pc libpcre32.pc libpcrecpp.pc '/usr/lib/pkgconfig' make install-data-hook make: Entering directory `/home/ec2-user/pcre-8.41' ln -sf pcre_assign_jit_stack.3 /usr/share/man/man3/pcre16_assign_jit_stack.3 ln -sf pcre_compile.3 /usr/share/man/man3/pcre16_compile.3 ln -sf pcre_compile2.3 /usr/share/man/man3/pcre16_compile2.3 ln -sf pcre_config.3 /usr/share/man/man3/pcre16_config.3 ln -sf pcre_copy_named_substring.3 /usr/share/man/man3/pcre16_copy_named_substring.3 ln -sf pcre_copy_substring.3 /usr/share/man/man3/pcre16_copy_substring.3 ln -sf pcre_dfa_exec.3 /usr/share/man/man3/pcre16_dfa_exec.3 ln -sf pcre_exec.3 /usr/share/man/man3/pcre16_exec.3 ln -sf pcre_free_study.3 /usr/share/man/man3/pcre16_free_study.3 ln -sf pcre_free_substring.3 /usr/share/man/man3/pcre16_free_substring.3 ln -sf pcre_free_substring_list.3 /usr/share/man/man3/pcre16_free_substring_list.3 ln -sf pcre_fullinfo.3 /usr/share/man/man3/pcre16_fullinfo.3 ln -sf pcre_get_named_substring.3 /usr/share/man/man3/pcre16_get_named_substring.3 ln -sf pcre_get_stringnumber.3 /usr/share/man/man3/pcre16_get_stringnumber.3 ln -sf pcre_get_stringtable_entries.3 /usr/share/man/man3/pcre16_get_stringtable_entries.3 ln -sf pcre_get_substring.3 /usr/share/man/man3/pcre16_get_substring.3 ln -sf pcre_get_substring_list.3 /usr/share/man/man3/pcre16_get_substring_list.3 ln -sf pcre_jit_exec.3 /usr/share/man/man3/pcre16_jit_exec.3 ln -sf pcre_jit_stack_alloc.3 /usr/share/man/man3/pcre16_jit_stack_alloc.3 ln -sf pcre_jit_stack_free.3 /usr/share/man/man3/pcre16_jit_stack_free.3 ln -sf pcre_maketables.3 /usr/share/man/man3/pcre16_maketables.3 ln -sf pcre_pattern_to_host_byte_order.3 /usr/share/man/man3/pcre16_pattern_to_host_byte_order.3 ln -sf pcre_refcount.3 /usr/share/man/man3/pcre16_refcount.3 ln -sf pcre_study.3 /usr/share/man/man3/pcre16_study.3 ln -sf pcre_utf16_to_host_byte_order.3 /usr/share/man/man3/pcre16_utf16_to_host_byte_order.3 ln -sf pcre_version.3 /usr/share/man/man3/pcre16_version.3 ln -sf pcre_assign_jit_stack.3 /usr/share/man/man3/pcre32_assign_jit_stack.3 ln -sf pcre_compile.3 /usr/share/man/man3/pcre32_compile.3 ln -sf pcre_compile2.3 /usr/share/man/man3/pcre32_compile2.3 ln -sf pcre_config.3 /usr/share/man/man3/pcre32_config.3 ln -sf pcre_copy_named_substring.3 /usr/share/man/man3/pcre32_copy_named_substring.3 ln -sf pcre_copy_substring.3 /usr/share/man/man3/pcre32_copy_substring.3 ln -sf pcre_dfa_exec.3 /usr/share/man/man3/pcre32_dfa_exec.3 ln -sf pcre_exec.3 /usr/share/man/man3/pcre32_exec.3 ln -sf pcre_free_study.3 /usr/share/man/man3/pcre32_free_study.3 ln -sf pcre_free_substring.3 /usr/share/man/man3/pcre32_free_substring.3 ln -sf pcre_free_substring_list.3 /usr/share/man/man3/pcre32_free_substring_list.3 ln -sf pcre_fullinfo.3 /usr/share/man/man3/pcre32_fullinfo.3 ln -sf pcre_get_named_substring.3 /usr/share/man/man3/pcre32_get_named_substring.3 ln -sf pcre_get_stringnumber.3 /usr/share/man/man3/pcre32_get_stringnumber.3 ln -sf pcre_get_stringtable_entries.3 /usr/share/man/man3/pcre32_get_stringtable_entries.3 ln -sf pcre_get_substring.3 /usr/share/man/man3/pcre32_get_substring.3 ln -sf pcre_get_substring_list.3 /usr/share/man/man3/pcre32_get_substring_list.3 ln -sf pcre_jit_exec.3 /usr/share/man/man3/pcre32_jit_exec.3 ln -sf pcre_jit_stack_alloc.3 /usr/share/man/man3/pcre32_jit_stack_alloc.3 ln -sf pcre_jit_stack_free.3 /usr/share/man/man3/pcre32_jit_stack_free.3 ln -sf pcre_maketables.3 /usr/share/man/man3/pcre32_maketables.3 ln -sf pcre_pattern_to_host_byte_order.3 /usr/share/man/man3/pcre32_pattern_to_host_byte_order.3 ln -sf pcre_refcount.3 /usr/share/man/man3/pcre32_refcount.3 ln -sf pcre_study.3 /usr/share/man/man3/pcre32_study.3 ln -sf pcre_utf32_to_host_byte_order.3 /usr/share/man/man3/pcre32_utf32_to_host_byte_order.3 ln -sf pcre_version.3 /usr/share/man/man3/pcre32_version.3 make: Leaving directory `/home/ec2-user/pcre-8.41' make: Leaving directory `/home/ec2-user/pcre-8.41' makeReferenced image: Leaving directory `/home/ec2-user/pcre-8.41' [ec2-user@ip-10-0-3-82 pcre-8.41]$ sudo mv -v /usr/lib/libpcre.so.* /lib ‘/usr/lib/libpcre.so.1’ -> ‘/lib/libpcre.so.1’ ‘/usr/lib/libpcre.so.1.2.9’ -> ‘/lib/libpcre.so.1.2.9’ [ec2-user@ip-10-0-3-82 pcre-8.41]$ sudo ln -sfv ../../lib/$(readlink /usr/lib/libpcre.so) /usr/lib/libpcre.so ‘/usr/lib/libpcre.so’ -> ‘../../lib/libpcre.so.1.2.9’ $ sudo service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] *phpinfo.php* enter image description here
Daniele Salvatore (131 rep)
Jan 8, 2018, 03:05 PM • Last activity: Jul 30, 2024, 01:02 PM
0 votes
2 answers
82 views
How do I get linux flavors, like Fedora, RHEL, Amazon Linux, and others that don't update motd on login to do so?
I am trying to get my Amazon Linux 2023 server to update the MOTD on login, not on a timer or by fiddling with the profile. I want a clean experience for users whether they re-exec their shell, or sudo.
I am trying to get my Amazon Linux 2023 server to update the MOTD on login, not on a timer or by fiddling with the profile. I want a clean experience for users whether they re-exec their shell, or sudo.
four43 (111 rep)
Jul 12, 2024, 05:58 PM • Last activity: Jul 12, 2024, 07:56 PM
-1 votes
1 answers
267 views
How do I get a package (or a package version) that is available on modern Fedora (or other RH-oids) for Amazon Linux 2023?
I'm regularly asked how to get some software on Amazon Linux 2023. Usually, I find the software to be already available on Fedora or modern Alma Linux. What do I do to get a software package that's easy to install on Amazon Linux?
I'm regularly asked how to get some software on Amazon Linux 2023. Usually, I find the software to be already available on Fedora or modern Alma Linux. What do I do to get a software package that's easy to install on Amazon Linux?
Marcus Müller (47107 rep)
Jul 4, 2024, 10:51 AM • Last activity: Jul 4, 2024, 11:02 AM
0 votes
1 answers
470 views
Can't install FISH on Amazon Linux 2023
I have an EC2 instance running Amazon Linux 2023. I added the fish repo per the instructions. I used `dnf config-manager --add-repo...` and then `dnf config-manager --enable-repo...`. I also added `g++, cmake, pcre2, gettext, gcc, pip` and any build-type packages. ``` [root@ip-172-31-24-201 /etc/yum...
I have an EC2 instance running Amazon Linux 2023. I added the fish repo per the instructions. I used dnf config-manager --add-repo... and then dnf config-manager --enable-repo.... I also added g++, cmake, pcre2, gettext, gcc, pip and any build-type packages.
[root@ip-172-31-24-201 /etc/yum.repos.d]# ls

amazonlinux.repo  fish.repo  kernel-livepatch.repo
I ran:
[root@ip-172-31-24-201 /etc/yum.repos.d]# dnf clean all

22 files removed

[root@ip-172-31-24-201 /etc/yum.repos.d]# dnf update

Amazon Linux 2023 repository                   38 MB/s |  25 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository  55 kB/s |  10 kB     00:00
Fish shell - 3.x release series (CentOS_8)     27 kB/s |  18 kB     00:00    
Dependencies resolved.
Nothing to do.
Complete!
When I try to install FISH, I receive the following errors:
[root@ip-172-31-24-201 ec2-user]# dnf install fish

Last metadata expiration check: 0:14:58 ago on Wed Jun 19 22:30:39 2024.
Error: 
 Problem: conflicting requests
  - package fish-3.7.1-3.1.aarch64 from shells_fish_release_3 does not have a compatible architecture
  - nothing provides /usr/libexec/platform-python needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
  - nothing provides ld-linux-aarch64.so.1()(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
  - nothing provides ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
  - nothing provides libdl.so.2(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
  - nothing provides libm.so.6(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
  - nothing provides libpthread.so.0(GLIBC_2.17)(64bit) needed by fish-3.7.1-3.1.aarch64 from shells_fish_release_3
  - nothing provides /usr/libexec/platform-python needed by fish-3.7.1-3.1.x86_64 from shells_fish_release_3
(try to add '--skip-broken' to skip uninstallable packages)
I'm not using ARM/aarch64 so I ran:
[root@ip-172-31-24-201 yum.repos.d]# dnf install fish --skip-broken

Last metadata expiration check: 0:01:27 ago on Wed Jun 19 23:02:14 2024.
Dependencies resolved.

 Problem: cannot install the best candidate for the job
  - nothing provides /usr/libexec/platform-python needed by fish-3.7.1-3.1.x86_64 from shells_fish_release_3
==================================================================================================================================================================================================================
 Package                                     Architecture                                  Version                                             Repository                                                    Size
==================================================================================================================================================================================================================
Skipping packages with broken dependencies:
 fish                                        x86_64                                        3.7.1-3.1                                           shells_fish_release_3                                        4.8 M

Transaction Summary
==================================================================================================================================================================================================================
Skip  1 Package

Nothing to do.
Complete!
Does anyone know how to fix this or install /usr/libexec/platform-python? thanks.
chuckd833 (43 rep)
Jun 19, 2024, 11:15 PM • Last activity: Jul 1, 2024, 05:14 AM
23 votes
5 answers
23643 views
Installing Let's Encrypt on Amazon Linux 2023
I am trying to get SSL certificate with Let's Encrypt nginx on Amazon Linux 2023. * First, I added EPEL using the commands ``` wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ``` and ``` sudo rpm -ihv --nodeps ./epel-release-latest-8.noarch.rpm ``` and it installed with n...
I am trying to get SSL certificate with Let's Encrypt nginx on Amazon Linux 2023. * First, I added EPEL using the commands
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 
and
sudo rpm -ihv --nodeps ./epel-release-latest-8.noarch.rpm
and it installed with no problem * Then I tried
sudo yum install python3-certbot-nginx
and got the error message:
Problem: package certbot-1.22.0-1.el8.noarch requires python3-certbot = 1.22.0-1.el8, 
    but none of the providers can be installed
      - conflicting requests
      - nothing provides python3.6dist(setuptools) >= 39.0.1 needed by python3-certbot-1.22.0-1.el8.noarch
      - nothing provides python3.6dist(cryptography) >= 2.5.0 needed by python3-certbot-1.22.0-1.el8.noarch
      - nothing provides python3.6dist(configobj) >= 5.0.6 needed by python3-certbot-1.22.0-1.el8.noarch
      - nothing provides python3.6dist(distro) >= 1.0.1 needed by python3-certbot-1.22.0-1.el8.noarch
      - nothing provides /usr/bin/python3.6 needed by python3-certbot-1.22.0-1.el8.noarch
      - nothing provides python3.6dist(pytz) needed by python3-certbot-1.22.0-1.el8.noarch
      - nothing provides python(abi) = 3.6 needed by python3-certbot-1.22.0-1.el8.noarch
      (try to add '--skip-broken' to skip uninstallable packages)
* I also tried
sudo dnf install python3-certbot-nginx
but got a similar error. I learned I may need a code ready builder but haven't been able to install it. Please how can I get it. If that is not the issue, please what I'm I doing wrong and how can I resolve it?
Sanmi Akande (331 rep)
Mar 30, 2023, 01:04 PM • Last activity: Jun 25, 2024, 02:00 PM
1 votes
1 answers
231 views
Why does augenrules refuse to run even when sudo is used?
I have Amazon Linux 2023 running in a Docker container and I would like to be able to load some custom audit rules into the kernel and ensure they are persisted when the container restarts. I have added the rules to `/etc/audit/rules.d/audit.rules` and can see them when I `cat` that file and I'm try...
I have Amazon Linux 2023 running in a Docker container and I would like to be able to load some custom audit rules into the kernel and ensure they are persisted when the container restarts. I have added the rules to /etc/audit/rules.d/audit.rules and can see them when I cat that file and I'm trying to use augenrules --load to load the rules. However, when I run this command the output I get is
/usr/sbin/augenrules: No change
You must be root to run this program.
I receive this same response even when running the command with sudo (sudo augenrules --load). I am already logged in as root (whoami returns root). I wondered whether it could be be because auditd service is not started (in which case the output from augenrules is misleading) but I am unable to check that status of this service as service auditd status (and any other service command like service auditd start) command gives me
Redirecting to /bin/systemctl status auditd.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
ps -p1 indicates the PID 1 is bash
PID TTY          TIME CMD
    1 pts/0    00:00:00 bash
I assume this is because I'm running in a container but don't know if this is why augenrules refuses to run when I am the root user even when using using sudo. What is causing this behaviour?
word4q (13 rep)
Jun 18, 2024, 12:22 PM • Last activity: Jun 18, 2024, 10:40 PM
11 votes
1 answers
7596 views
How to install certbot via snap on Amazon Linux 2023
I am following this guide on how to [Configure SSL/TLS on Amazon Linux 2023][1]. It recommends to obtain a CA-signed certificate using [Certbot][2]. And to get Certbot, it's recommended to install Snap. I have tried several things, not able to install any of prerequisites: sudo yum install snapd Err...
I am following this guide on how to Configure SSL/TLS on Amazon Linux 2023 . It recommends to obtain a CA-signed certificate using Certbot . And to get Certbot, it's recommended to install Snap. I have tried several things, not able to install any of prerequisites: sudo yum install snapd Error: Unable to find a match: snapd sudo amazon-linux-extras install epel sudo: amazon-linux-extras: command not found sudo yum install -y amazon-linux-extras Error: Unable to find a match: amazon-linux-extras
Razkar (211 rep)
May 1, 2023, 01:55 PM • Last activity: May 18, 2024, 09:58 AM
-1 votes
3 answers
2229 views
Unable to install MySql on Amazon Linux 2023
I am working on a EC2(AWS) machine running Amazon Linux 2023.4.20240319. I need to install apache, php, and mysql. I stuck with mysql. I have followed many instructions found on the internet: - https://tecadmin.net/install-mysql-8-on-fedora/ - https://dev.mysql.com/doc/refman/8.0/en/linux-installati...
I am working on a EC2(AWS) machine running Amazon Linux 2023.4.20240319. I need to install apache, php, and mysql. I stuck with mysql. I have followed many instructions found on the internet: - https://tecadmin.net/install-mysql-8-on-fedora/ - https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html - https://stackoverflow.com/questions/70993613/unable-to-install-mysql-on-centos7/72469498#72469498 But there's a last error that doesn't have solutions:
$ sudo yum --enablerepo=mysql80-community install mysql-community-server
MySQL 8.0 Community Server                                      37  B/s |  10  B     00:00    
Errors during downloading metadata for repository 'mysql80-community':
  - Status code: 404 for http://repo.mysql.com/yum/mysql-8.0-community/fc/2023.4.20240319/aarch64/repodata/repomd.xml  (IP: 23.213.17.14)
Error: Failed to download metadata for repo 'mysql80-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: mysql80-community
Last metadata expiration check: 0:14:52 ago on Wed Mar 27 14:50:32 2024.
No match for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server
I have uninstalled packages and cleaned cache then re-try but it is the same result. How can i fix it please ? **Update** mysql is not available in the default yum repositories
$ sudo dnf search mysql
Last metadata expiration check: 1:53:50 ago on Wed Mar 27 14:50:32 2024.
================================ Name & Summary Matched: mysql ================================apr-util-mysql.aarch64 : APR utility library MySQL DBD driver
bind-dlz-mysql.aarch64 : BIND server mysql and mysqldyn DLZ modules
collectd-mysql.aarch64 : MySQL plugin for collectd
dovecot-mysql.aarch64 : MySQL back end for dovecot
mysql-selinux.noarch : SELinux policy modules for MySQL and MariaDB packages
mysql80-community-release.noarch : MySQL repository configuration for yum
perl-DBD-MySQL.aarch64 : A MySQL interface for Perl
perl-DateTime-Format-MySQL.noarch : Parse and format MySQL dates and times
php8.1-mysqlnd.aarch64 : A module for PHP 8.1 applications that use MySQL databases
php8.2-mysqlnd.aarch64 : A module for PHP 8.2 applications that use MySQL databases
postfix-mysql.aarch64 : Postfix MySQL map support
=================================== Summary Matched: mysql ====================================mariadb105-devel.aarch64 : Files for development of MariaDB/MySQL applications
mariadb105-server-utils.aarch64 : Non-essential server utilities for MariaDB/MySQL applicationsperl-DBD-MariaDB.aarch64 : MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
Brayan Tiwa (11 rep)
Mar 27, 2024, 03:54 PM • Last activity: Mar 27, 2024, 07:20 PM
0 votes
0 answers
869 views
How to install redis 7.2 on amazon linux 2023
How to install redis 7.2 on amazon linux 2023. When I do the default installation it only install redis 6.x.
How to install redis 7.2 on amazon linux 2023. When I do the default installation it only install redis 6.x.
kumar (221 rep)
Mar 1, 2024, 06:56 AM
1 votes
1 answers
1210 views
Problem installing LibreOffice on Amazon Linux 2023
I am following the instructions on how to install LibreOffice on Fedora which is what I believe Amazon Linux 2023 uses under the hood: https://tecadmin.net/install-libreoffice-on-fedora/ I can download and extract the zip package. However, when I run `dnf install RPMS/*.rpm`, I get the following err...
I am following the instructions on how to install LibreOffice on Fedora which is what I believe Amazon Linux 2023 uses under the hood: https://tecadmin.net/install-libreoffice-on-fedora/ I can download and extract the zip package. However, when I run dnf install RPMS/*.rpm, I get the following error: error: No package matches 'RPMS/libobasis7.6-base-7.6.4.1-1.x86_64.rpm' The content of the RPMS folder is as follows: -rw-rw-r-- 1 root root 1237800 Dec 1 10:51 libobasis7.6-base-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 7643097 Dec 1 10:51 libobasis7.6-calc-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 91309240 Dec 1 10:54 libobasis7.6-core-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 6407 Dec 1 10:52 libobasis7.6-draw-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 81581 Dec 1 10:52 libobasis7.6-en-US-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 404419 Dec 1 10:51 libobasis7.6-extension-beanshell-script-provider-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 642636 Dec 1 10:51 libobasis7.6-extension-javascript-script-provider-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 1998248 Dec 1 10:52 libobasis7.6-extension-mediawiki-publisher-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 1067433 Dec 1 10:52 libobasis7.6-extension-nlpsolver-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 3329870 Dec 1 10:51 libobasis7.6-extension-pdf-import-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2971346 Dec 1 10:52 libobasis7.6-extension-report-builder-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2959808 Dec 1 10:52 libobasis7.6-firebird-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 610717 Dec 1 10:54 libobasis7.6-gnome-integration-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 1222506 Dec 1 10:51 libobasis7.6-graphicfilter-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 61644927 Dec 1 10:51 libobasis7.6-images-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 191522 Dec 1 10:51 libobasis7.6-impress-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2340064 Dec 1 10:51 libobasis7.6-kde-integration-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 208326 Dec 1 10:51 libobasis7.6-librelogo-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 3718 Dec 1 10:51 libobasis7.6-libreofficekit-data-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 538291 Dec 1 10:51 libobasis7.6-math-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 157039 Dec 1 10:52 libobasis7.6-ogltrans-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 125283 Dec 1 10:51 libobasis7.6-onlineupdate-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 17292382 Dec 1 10:51 libobasis7.6-ooofonts-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2757 Dec 1 10:51 libobasis7.6-ooolinguistic-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2025230 Dec 1 10:51 libobasis7.6-postgresql-sdbc-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 13292 Dec 1 10:51 libobasis7.6-python-script-provider-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 9795742 Dec 1 10:51 libobasis7.6-pyuno-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 3952315 Dec 1 10:51 libobasis7.6-writer-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 420612 Dec 1 10:51 libobasis7.6-xsltfilter-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 576247 Dec 1 10:52 libreoffice7.6-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2347 Dec 1 10:51 libreoffice7.6-base-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2343 Dec 1 10:51 libreoffice7.6-calc-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 5682300 Dec 1 10:51 libreoffice7.6-dict-en-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2780003 Dec 1 10:51 libreoffice7.6-dict-es-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 1857501 Dec 1 10:51 libreoffice7.6-dict-fr-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2347 Dec 1 10:51 libreoffice7.6-draw-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 7518 Dec 1 10:52 libreoffice7.6-en-US-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 752859 Dec 1 09:09 libreoffice7.6-freedesktop-menus-7.6.4-1.noarch.rpm -rw-rw-r-- 1 root root 2382 Dec 1 10:54 libreoffice7.6-impress-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2347 Dec 1 10:52 libreoffice7.6-math-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 14441942 Dec 1 10:52 libreoffice7.6-ure-7.6.4.1-1.x86_64.rpm -rw-rw-r-- 1 root root 2369 Dec 1 10:54 libreoffice7.6-writer-7.6.4.1-1.x86_64.rpm It appears that the missing file is actually there, but I can't install LibreOffice. This is my dockerfile, and I am executing this on an Apple M3 Macbook: FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.12 RUN dnf install \ gzip \ wget \ tar \ -y && \ dnf clean all RUN wget https://download.documentfoundation.org/libreoffice/stable/7.6.4/rpm/x86_64/LibreOffice_7.6.4_Linux_x86-64_rpm.tar.gz RUN tar -xvf LibreOffice_7.6.4_Linux_x86-64_rpm.tar.gz RUN cd LibreOffice_7.6.4.1_Linux_x86-64_rpm/ RUN dnf install RPMS/*.rpm
kravb (111 rep)
Dec 26, 2023, 07:03 PM • Last activity: Dec 28, 2023, 01:02 AM
2 votes
0 answers
1661 views
How to run Amazon Linux 2 on Apple Silicon
Amazon Linux 2 -- historically a cloud offering -- is also offered as an [on-premise](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html) solution for various setups. The two most popular on-premise solutions are: - Virtual Machine (e.g. KVM, Oracle VirtualBox, V...
Amazon Linux 2 -- historically a cloud offering -- is also offered as an [on-premise](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html) solution for various setups. The two most popular on-premise solutions are: - Virtual Machine (e.g. KVM, Oracle VirtualBox, VMware, Microsoft Hyper-V) - Container (i.e. Docker) However, for convenience and simplicity, I would like to run Amazon Linux 2 in Parallels on Apple Silicon (e.g. M1 CPU). What I've tried: * Install [Homewbrew](https://brew.sh/) * Install qemu to get access to the qemu-convert
brew install qemu
* Download the [kvm "qcow2" ARM64 image](https://cdn.amazonlinux.com/os-images/2.0.20220419.0/kvm-arm64/) of Amazon Linux 2 * Convert the image to "vdi" format:
qemu-img convert -f qcow2 amzn2-kvm-2.qcow2 -O vdi amzn2-kvm-2.vdi
... however Parallels says the following: > "Parallels doesn't support the EFI boot loader for this guest OS type or architecture" enter image description here I've also tried to edit the VM's config.pvs with an XML editor and via [bios flag](https://kb.parallels.com/en/122735) to try to disable EFI without success, Parallels will always say something like "A critical error has occurred while reading/writing to Hard Disk 0 used by Amazon Linux 2". Crosspost to the same question on Parallels Forums: https://forum.parallels.com/threads/apple-silicon-support-for-amazon-linux-2.357286/ (deleted) Reddit thread using UTM: https://www.reddit.com/r/aws/comments/rxat5m/run_amzn2_kvm_arm64xfsgptqcow2_image_onprem_with/
tresf (355 rep)
Apr 22, 2022, 03:28 PM • Last activity: Nov 28, 2023, 06:25 AM
Showing page 1 of 20 total questions