RVM 2.7.7 symlink on Ubuntu 22 not successfully allowing code-deploy-agent installation
Closed this issue · 3 comments
alilland commented
with ruby 2.7.7 installed via RVM on Ubuntu 22
$ ruby --version
ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [x86_64-linux]
$ which ruby
/usr/share/rvm/rubies/ruby-2.7.7/bin/ruby
Installing Code Deploy agent was throwing this error after downloading code deploy
$ wget https://aws-codedeploy-us-west-1.s3.us-west-1.amazonaws.com/latest/install
$ chmod +x ./install
$ sudo ./install auto
I, [2023-01-24T19:47:24.392887 #27736] INFO -- : Starting Ruby version check.
E, [2023-01-24T19:47:24.393101 #27736] ERROR -- : Current running Ruby version for root is 3.0.2, but Ruby version 2.x needs to be installed.
E, [2023-01-24T19:47:24.393138 #27736] ERROR -- : If you already have the proper Ruby version installed, please either create a symlink to /usr/bin/ruby2.x,
E, [2023-01-24T19:47:24.393199 #27736] ERROR -- : or run this install script with right interpreter. Otherwise please install Ruby 2.x for root user.
E, [2023-01-24T19:47:24.393259 #27736] ERROR -- : You can get more information by running the script with --help option.
it appears to still throw an error even after doing a symlink
$ sudo ln -s /usr/share/rvm/rubies/ruby-2.7.7/bin/ruby /usr/bin/ruby2.7
$ sudo ./install auto
I, [2023-01-24T19:49:19.166790 #27744] INFO -- : Starting Ruby version check.
W, [2023-01-24T19:49:19.166940 #27744] WARN -- : The Ruby version in /usr/bin/ruby2.7 is 3.0.2, . Attempting to install anyway.
I, [2023-01-24T19:49:19.166980 #27744] INFO -- : Starting update check.
I, [2023-01-24T19:49:19.167005 #27744] INFO -- : Attempting to automatically detect supported package manager type for system...
I, [2023-01-24T19:49:19.176034 #27744] INFO -- : Checking AWS_REGION environment variable for region information...
I, [2023-01-24T19:49:19.176112 #27744] INFO -- : Checking EC2 metadata service for region information...
I, [2023-01-24T19:49:19.191739 #27744] INFO -- : Checking AWS_DOMAIN environment variable for domain information...
I, [2023-01-24T19:49:19.191804 #27744] INFO -- : Checking EC2 metadata service for domain information...
I, [2023-01-24T19:49:19.197199 #27744] INFO -- : Downloading version file from bucket aws-codedeploy-us-west-1 and key latest/LATEST_VERSION...
I, [2023-01-24T19:49:19.197331 #27744] INFO -- : Endpoint: https://aws-codedeploy-us-west-1.s3.us-west-1.amazonaws.com/latest/LATEST_VERSION
dpkg-query: package 'codedeploy-agent' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
I, [2023-01-24T19:49:19.243800 #27744] INFO -- : Running version No running version
I, [2023-01-24T19:49:19.244210 #27744] INFO -- : Downloading package from bucket aws-codedeploy-us-west-1 and key releases/codedeploy-agent_1.4.1-2244_all.deb...
I, [2023-01-24T19:49:19.244381 #27744] INFO -- : Endpoint: https://aws-codedeploy-us-west-1.s3.us-west-1.amazonaws.com/releases/codedeploy-agent_1.4.1-2244_all.deb
I, [2023-01-24T19:49:19.304419 #27744] INFO -- : Executing `/usr/bin/gdebi -n -o Dpkg::Options::=--force-confdef -o Dkpg::Options::=--force-confold /tmp/codedeploy-agent_1.4.1-2244_all.tmp-20230124-27744-me370q.deb`...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: ruby2.0|ruby2.1|ruby2.2|ruby2.3|ruby2.4|ruby2.5|ruby2.6|ruby2.7
E, [2023-01-24T19:49:20.057258 #27744] ERROR -- : Error installing /tmp/codedeploy-agent_1.4.1-2244_all.tmp-20230124-27744-me370q.deb.
not sure what to do from here
CaptainStiggz commented
Same issue here. Did you find a solution? Feeling like I may just need to downgrade ubuntu.
priyankade commented
Installed ruby 2.7.7, But facing same issue:
# ll /usr/bin/ruby*
lrwxrwxrwx 1 root root 36 Feb 7 21:22 /usr/bin/ruby -> /root/.rbenv/versions/2.7.7/bin/ruby*
-rwxr-xr-x 1 root root 36022 Mar 31 2020 /usr/bin/ruby-build*
-rwxr-xr-x 1 root root 14488 Jan 18 17:28 /usr/bin/ruby3.0*
# sudo ./install auto
I, [2023-02-08T15:51:14.147621 #56647] INFO -- : Starting Ruby version check.
W, [2023-02-08T15:51:14.147734 #56647] WARN -- : The Ruby version in /root/.rbenv/versions/2.7.7/bin/ruby is 2.7.7, . Attempting to install anyway.
I, [2023-02-08T15:51:14.147773 #56647] INFO -- : Starting update check.
I, [2023-02-08T15:51:14.147799 #56647] INFO -- : Attempting to automatically detect supported package manager type for system...
I, [2023-02-08T15:51:14.157657 #56647] INFO -- : Checking AWS_REGION environment variable for region information...
I, [2023-02-08T15:51:14.157747 #56647] INFO -- : Checking EC2 metadata service for region information...
I, [2023-02-08T15:51:14.168787 #56647] INFO -- : Checking AWS_DOMAIN environment variable for domain information...
I, [2023-02-08T15:51:14.169043 #56647] INFO -- : Checking EC2 metadata service for domain information...
I, [2023-02-08T15:51:14.173318 #56647] INFO -- : Downloading version file from bucket aws-codedeploy-us-east-2 and key latest/LATEST_VERSION...
I, [2023-02-08T15:51:14.173456 #56647] INFO -- : Endpoint: https://aws-codedeploy-us-east-2.s3.us-east-2.amazonaws.com/latest/LATEST_VERSION
dpkg-query: package 'codedeploy-agent' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
I, [2023-02-08T15:51:14.210355 #56647] INFO -- : Running version No running version
I, [2023-02-08T15:51:14.210814 #56647] INFO -- : Downloading package from bucket aws-codedeploy-us-east-2 and key releases/codedeploy-agent_1.4.1-2244_all.deb...
I, [2023-02-08T15:51:14.210964 #56647] INFO -- : Endpoint: https://aws-codedeploy-us-east-2.s3.us-east-2.amazonaws.com/releases/codedeploy-agent_1.4.1-2244_all.deb
I, [2023-02-08T15:51:14.262954 #56647] INFO -- : Executing `/usr/bin/gdebi -n -o Dpkg::Options::=--force-confdef -o Dkpg::Options::=--force-confold /tmp/codedeploy-agent_1.4.1-2244_all.tmp-20230208-56647-7c374r.deb`...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: ruby2.0|ruby2.1|ruby2.2|ruby2.3|ruby2.4|ruby2.5|ruby2.6|ruby2.7
E, [2023-02-08T15:51:15.005293 #56647] ERROR -- : Error installing /tmp/codedeploy-agent_1.4.1-2244_all.tmp-20230208-56647-7c374r.deb.
root@ip-10-1-0-250:/home/ubuntu#
mwjones-aws commented
CodeDeploy Agent 1.5.0 added Uubuntu 22.04 support, and Ruby 3.0 support. release notes
CodeDeploy Agent 1.6.0 adds AL2023 and Ruby 3.2 support. It has been released to most commercial regions as of this comment.
Please track release progress on #360