I have migrated my Rails application from Rails 6 to 7 and I am successfully able to run it locally. But when I try to deploy this application on AWS - ElasticBeanstalk, it fails during /bin/su webapp -c bundle exec rake assets:precompile step.
Below are the deploy logs (/var/log/eb-engine.log) from Amazon Linux 2 EC2 instance:
[INFO] Starting...
[INFO] Starting EBPlatform-PlatformEngine
[INFO] reading event message file
[INFO] Engine received EB command cfn-hup-exec
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID -r AWSEBAutoScalingGroup --region us-east-1
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID -r AWSEBBeanstalkMetadata --region us-east-1
[INFO] checking whether command app-deploy is applicable to this instance...
[INFO] this command is applicable to the instance, thus instance should execute command
[INFO] Engine command: (app-deploy)
[INFO] Downloading EB Application...
[INFO] Region: us-east-1
[INFO] envID
[INFO] envBucket: elasticbeanstalk-us-east-1-XXXXX
[INFO] Using manifest file name from command request
[INFO] Manifest name is : manifest_xxxxx
[INFO] Download app version manifest
[INFO] Downloading: bucket: elasticbeanstalk-us-east-1-XXXXX, object: /resources/environments/e-eid/_runtime/versions/manifest_xxxxx
[INFO] Download successful168bytes downloaded
[INFO] Trying to read and parse version manifest...
[INFO] Downloading: bucket: elasticbeanstalk-us-east-1-XXXXX, object: /resources/environments/e-eid/_runtime/_versions/appName/code-pipeline-ID
[INFO] Download successful28982425bytes downloaded
[INFO] Executing instruction: ElectLeader
[INFO] Running leader election for instance i-0d356...
[INFO] Calling the cfn-elect-cmd-leader to elect the command leader.
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-elect-cmd-leader --stack arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID --command-name ElasticBeanstalkCommand-AWSEBAutoScalingGroup --invocation-id ID --listener-id i-0d356 --region us-east-1
[INFO] Instance is Leader.
[INFO] Executing instruction: stopSqsd
[INFO] This is a web server environment instance, skip stop sqsd daemon ...
[INFO] Executing instruction: PreBuildEbExtension
[INFO] Starting executing the config set Infra-EmbeddedPreBuild.
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID -r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPreBuild
[INFO] Finished executing the config set Infra-EmbeddedPreBuild.
[INFO] Executing instruction: StageApplication
[INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
[INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
[INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
[INFO] Executing instruction: RunAppDeployPreBuildHooks
[INFO] Executing platform hooks in .platform/hooks/prebuild/
[INFO] Following scripts will be executed in order: [01_install_packages.sh 02_prepare_bundle_local.sh 03_ebenv.sh 04_install_wkhtmltopdf_kit.sh]
[INFO] Running script: .platform/hooks/prebuild/01_install_packages.sh
[INFO] Running script: .platform/hooks/prebuild/02_prepare_bundle_local.sh
[INFO] Running script: .platform/hooks/prebuild/03_ebenv.sh
[INFO] Running script: .platform/hooks/prebuild/04_install_wkhtmltopdf_kit.sh
[INFO] Finished running scripts in /var/app/staging/.platform/hooks/prebuild
[INFO] Executing instruction: stage ruby application
[INFO] stage ruby application ....
[INFO] Running command /bin/sh -c rbenv global
[INFO] 2.7.5
[INFO] Running command /bin/sh -c bundle --version
[INFO] Bundler version 2.3.10
[INFO] Running command /bin/sh -c bundle config set --local deployment true
[INFO] Running command /bin/sh -c bundle _2.3.10_ install --local
[INFO] Installing rake 13.0.6
Installing concurrent-ruby 1.1.10
Installing minitest 5.15.0
Installing builder 3.2.4
Installing erubi 1.10.0
Installing mini_portile2 2.8.0
Installing racc 1.6.0 with native extensions
Installing crass 1.0.6
Installing rack 2.2.3
Installing nio4r 2.5.8 with native extensions
Installing websocket-extensions 0.1.5
Installing marcel 1.0.2
Installing mini_mime 1.1.2
Installing aws-eventstream 1.2.0
Installing aws-partitions 1.587.0
Installing jmespath 1.6.1
Using bundler 2.3.10
Installing method_source 1.0.0
Installing thor 1.2.1
Installing zeitwerk 2.5.4
Installing jsonapi-renderer 0.2.2
Installing public_suffix 4.0.7
Installing amazon_pay 2.6.1
Installing execjs 2.8.1
Installing faraday-em_http 1.0.0
Installing faraday-em_synchrony 1.0.0
Installing faraday-excon 1.1.0
Installing faraday-httpclient 1.0.1
Installing multipart-post 2.1.1
Installing faraday-net_http 1.0.1
Installing faraday-net_http_persistent 1.2.0
Installing faraday-patron 1.0.0
Installing faraday-rack 1.0.0
Installing faraday-retry 1.0.3
Installing ruby2_keywords 0.0.5
Installing multi_json 1.15.0
Installing bcrypt 3.1.18 with native extensions
Installing msgpack 1.5.1 with native extensions
Installing bootstrap-filestyle-rails 1.2.1
Installing ffi 1.15.5 with native extensions
Installing rexml 3.2.5
Installing browser 5.3.1
Installing climate_control 0.2.0
Installing coderay 1.1.3
Installing coffee-script-source 1.12.2
Installing country-select 1.2.1
Installing dalli 3.2.1
Installing declarative 0.0.20
Installing orm_adapter 0.5.0
Installing hashie 5.0.0
Installing elasticsearch-rails 7.2.1
Installing excon 0.92.3
Installing flutie 2.2.0
Installing formatador 1.1.0
Installing mime-types-data 3.2022.0105
Installing foundation_emails 2.2.1.0
Installing geocoder 1.8.0
Installing jwt 2.3.0
Installing memoist 0.16.2
Installing os 1.0.1
Installing httpclient 2.8.3
Installing trailblazer-option 0.1.2
Installing uber 0.1.0
Installing retriable 3.1.2
Installing webrick 1.7.0
Installing sexp_processor 4.16.1
Installing temple 0.8.2
Installing tilt 2.0.10
Installing honeybadger 4.12.1
Installing htmlentities 4.3.4
Installing jquery-datetimepicker-rails 2.4.1.0
Installing rb-fsevent 0.11.1
Installing json 2.6.2 with native extensions
Installing kaminari-core 1.2.2
Installing memcachier 0.0.2
Installing newrelic_rpm 8.7.0
Installing pg 1.3.5 with native extensions
Installing puma 3.12.6 with native extensions
Installing rails_serve_static_assets 0.0.5
Installing rails_stdout_logging 0.0.5
Installing rdoc 6.3.3
Installing ruby-ole 1.2.12.2
Installing rubyzip 2.3.2
Installing slack-notifier 2.4.0
Installing turbolinks-source 5.2.0
Installing wkhtmltopdf-binary 0.12.6
Installing sitemap_generator 6.2.1
Installing i18n 1.10.0
Installing tzinfo 2.0.4
Installing rack-test 1.1.0
Installing warden 1.2.9
Installing font_assets 0.1.14
Installing rack-cors 1.1.1
Installing rack-maintenance 2.1.0
Installing sprockets 3.7.2
Installing nokogiri 1.13.6 with native extensions
Installing websocket-driver 0.7.5 with native extensions
Installing mail 2.7.1
Installing aws-sigv4 1.5.0
Installing addressable 2.8.0
Installing autoprefixer-rails 10.4.7.0
Installing uglifier 4.2.0
Installing faraday-multipart 1.0.3
Installing elasticsearch-api 7.17.1
Installing bootsnap 1.4.9 with native extensions
Installing braintree 4.7.0
Installing terrapin 0.6.0
Installing pry 0.14.1
Installing coffee-script 2.4.1
Installing mime-types 3.4.1
Installing representable 3.2.0
Installing ruby_parser 3.19.1
Installing haml 5.2.2
Installing recaptcha 5.10.0
Installing sendgrid 1.2.4
Installing rails_12factor 0.0.3
Installing sdoc 1.1.0
Installing spreadsheet 1.3.0
Installing turbolinks 5.2.1
Installing sassc 2.1.0 with native extensions
Installing get_process_mem 0.2.7
Installing rb-inotify 0.10.1
Installing activesupport 7.0.0
Installing aws-sdk-core 3.131.0
Installing css_parser 1.11.0
Installing faraday 1.10.0
Installing pry-rails 0.3.9
Installing fog-core 2.3.0
Installing ruby2ruby 2.4.4
Installing loofah 2.18.0
Installing inky-rb 1.4.2.0
Installing mimemagic 0.3.10 with native extensions
Installing puma_worker_killer 0.3.1
Installing sass-listen 4.0.0
Installing rails-dom-testing 2.0.3
Installing globalid 1.0.0
Installing activemodel 7.0.0
Installing case_transform 0.2
Installing rack-tracker 1.13.0
Installing view_component 2.55.0
Installing wicked_pdf 2.6.2
Installing aws-sdk-sqs 1.51.1
Installing aws-sdk-kms 1.57.0
Installing premailer 1.16.0
Installing faraday_middleware 1.2.0
Installing elasticsearch-transport 7.17.1
Installing signet 0.16.1
Installing twilio-ruby 5.67.0
Installing fog-json 1.2.0
Installing fog-xml 0.1.4
Installing rails-html-sanitizer 1.4.2
Installing sass 3.7.4
Installing activejob 7.0.0
Installing activerecord 7.0.0
Installing paperclip 6.0.0
Installing aws-sdk-s3 1.114.0
Installing avatax 22.3.0
Installing elasticsearch 7.17.1
Installing googleauth 1.1.3
Installing fog-aws 3.14.0
Installing actionview 7.0.0
Installing audited 5.0.2
Installing friendly_id 5.4.2
Installing hairtrigger 0.2.25
Installing kaminari-activerecord 1.2.2
Installing pg_search 2.3.6
Installing pghero 2.8.3
Installing paperclip-compression 2.0.0
Installing elasticsearch-model 7.2.1
Installing google-apis-core 0.5.0
Installing actionpack 7.0.0
Installing jbuilder 2.11.5
Installing kaminari-actionview 1.2.2
Installing elasticsearch-persistence 7.2.1
Installing google-apis-analyticsreporting_v4 0.7.0
Installing actioncable 7.0.0
Installing activestorage 7.0.0
Installing actionmailer 7.0.0
Installing actionpack-action_caching 1.2.2
Installing railties 7.0.0
Installing active_model_serializers 0.10.13
Installing apipie-rails 0.7.2
Installing sprockets-rails 3.4.2
Installing simple_form 5.1.0
Installing kaminari 1.2.2
Installing actionmailbox 7.0.0
Installing actiontext 7.0.0
Installing premailer-rails 1.11.1
Installing coffee-rails 5.0.0
Installing responders 3.0.1
Installing jquery-rails 4.4.0
Installing jquery-fileupload-rails 0.4.7
Installing jquery-ui-rails 5.0.3
Installing masonry-rails 0.2.4
Installing rails-healthcheck 1.4.0
Installing sass-rails 5.1.0
Installing rails 7.0.0
Installing devise 4.8.1
Installing jhtmlarea 0.1.0
Installing active_elastic_job 3.2.0
Installing chartjs-ror 3.7.0
Installing dropzonejs-rails 0.8.5
Installing gridhook 0.2.0
Using s3_direct_upload 0.1.7 from https://github.com/waynehoover/s3_direct_upload.git (at /var/app/staging/vendor/cache/s3_direct_upload-6f6decc75fdf#6f6decc)
Installing bootstrap-sass 3.4.1
Bundle complete! 94 Gemfile dependencies, 205 gems now installed.
Gems in the groups 'test' and 'development' were not installed.
Bundled gems are installed into `./vendor/bundle`
[INFO] Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
[INFO] Running command /bin/sh -c rbenv rehash
[INFO] encountered a Gemfile.lock, setting proper permissions to user webapp
[INFO] Executing instruction: check default web server
[INFO] Executing instruction: check procfile
[INFO] detected Procfile in application source bundle ...
[INFO] Executing instruction: configure X-Ray
[INFO] X-Ray is not enabled.
[INFO] Executing instruction: Configure proxy Nginx
[INFO] configuring proxy...
[INFO] Copying file nginx/webapp.conf to /nginx/conf.d/elasticbeanstalk/webapp.conf
[INFO] Copying file /opt/elasticbeanstalk/config/private/nginx/elasticbeanstalk-nginx-ruby-upstream.conf to /var/proxy/staging/nginx/conf.d/elasticbeanstalk-nginx-ruby-upstream.conf
[INFO] Running command /bin/sh -c cp -rp /var/app/staging/.platform/nginx/. /var/proxy/staging/nginx
[INFO] Executing instruction: configure healthd specific proxy conf
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[WARN] Warning: process healthd is already registered...
Deregistering the process ...
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[INFO] Running command /bin/sh -c systemctl is-active healthd.service
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[INFO] Running command /bin/sh -c systemctl stop healthd.service
[INFO] Running command /bin/sh -c systemctl disable healthd.service
[INFO] Removed symlink /etc/systemd/system/multi-user.target.wants/healthd.service.
[INFO] Running command /bin/sh -c systemctl daemon-reload
[INFO] Running command /bin/sh -c systemctl reset-failed
[INFO] Running command /bin/sh -c systemctl daemon-reload
[INFO] Running command /bin/sh -c systemctl reset-failed
[INFO] Running command /bin/sh -c systemctl is-enabled aws-eb.target
[INFO] Running command /bin/sh -c systemctl enable aws-eb.target
[INFO] Running command /bin/sh -c systemctl start aws-eb.target
[INFO] Running command /bin/sh -c systemctl enable healthd.service
[INFO] Created symlink from /etc/systemd/system/multi-user.target.wants/healthd.service to /etc/systemd/system/healthd.service.
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[INFO] Running command /bin/sh -c systemctl is-active healthd.service
[INFO] Running command /bin/sh -c systemctl start healthd.service
[INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_logformat.conf to /var/proxy/staging/nginx/conf.d/healthd_logformat.conf
[INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_nginx.conf to /var/proxy/staging/nginx/conf.d/elasticbeanstalk/healthd.conf
[INFO] Executing instruction: rake tasks
[INFO] Running command /bin/sh -c npm bin --global
[INFO] /opt/elasticbeanstalk/support/node-install/node-v16.14.2-linux-x64/bin
[INFO] (not in PATH env variable)
[INFO] Running command /bin/sh -c rbenv global
[INFO] 2.7.5
[INFO] Running command /bin/su webapp -c bundle exec /opt/elasticbeanstalk/config/private/checkforraketask.rb assets:precompile
[INFO] Found assets:precompile task in Rakefile
[INFO] Running command /bin/su webapp -c bundle exec rake assets:precompile
[INFO] You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install
rake aborted!
LoadError: cannot load such file -- connection_pool
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/dalli-3.2.1/lib/rack/session/dalli.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/session/mem_cache_store.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `const_get'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `session_store'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:66:in `block in build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/stack.rb:72:in `initialize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `new'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:568:in `default_middleware_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:514:in `block in app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `synchronize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/finisher.rb:57:in `block in <module:Finisher>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `instance_exec'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `run'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:60:in `run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:369:in `initialize!'
/var/app/staging/config/environment.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:345:in `require_environment!'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:507:in `block in run_tasks_blocks'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `load'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
[ERROR] An error occurred during execution of command [app-deploy] - [rake tasks]. Stop running the command. Error: running rake task assets:precompile failed with error command bundle exec rake assets:precompile failed with error Command /bin/su webapp -c bundle exec rake assets:precompile failed with error exit status 1. Stderr:You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install
rake aborted!
LoadError: cannot load such file -- connection_pool
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/dalli-3.2.1/lib/rack/session/dalli.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/session/mem_cache_store.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `const_get'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `session_store'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:66:in `block in build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/stack.rb:72:in `initialize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `new'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:568:in `default_middleware_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:514:in `block in app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `synchronize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/finisher.rb:57:in `block in <module:Finisher>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `instance_exec'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `run'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:60:in `run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:369:in `initialize!'
/var/app/staging/config/environment.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:345:in `require_environment!'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:507:in `block in run_tasks_blocks'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `load'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
[INFO] Executing cleanup logic
[INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1653470206490,"severity":"ERROR"}]}]}
[INFO] Platform Engine finished execution on command: app-deploy
Dalli from version 3.0.0 and above has dependency on connection_pool gem and interestingly this gem was not downloaded during bundle install. Downgrading dalli to 2.7.11 resolved this for me.
Related
Requirement: To install R Packages in Airflow to execute the RScript in Airflow
Tried: Below commands in DockerFile
# Global Docker Build arguments
ARG AIRFLOW_VERSION=2.3.3
ARG PYTHON_RUNTIME_VERSION=3.8
FROM apache/airflow:${AIRFLOW_VERSION}-python${PYTHON_RUNTIME_VERSION}
SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]
USER 0
RUN apt-get update && apt-get install -y r-base r-base-core && \
rm -r /var/lib/apt/lists/*
RUN R -e "install.packages('httr', repos='https://cran.rstudio.com/')"
RUN R -e "install.packages('jsonlite', repos='http://cran.rstudio.com/')"
Error : Error in library(httr) : there is no package called ‘httr’
Also Tried another by including in the RScript as
install.packages("httr")
install.packages("jsonlite")
library(httr)
library(jsonlite)
Got error as
Running command: ['Rscript', '/opt/airflow/dags/r_scripts/R_script.R']
[2023-01-04, 16:57:58 UTC] {subprocess.py:85} INFO - Output:
[2023-01-04, 16:57:58 UTC] {subprocess.py:92} INFO - Installing package into ‘/usr/local/lib/R/site-library’
[2023-01-04, 16:57:58 UTC] {subprocess.py:92} INFO - (as ‘lib’ is unspecified)
[2023-01-04, 16:57:58 UTC] {subprocess.py:92} INFO - Warning in install.packages("httr") :
[2023-01-04, 16:57:58 UTC] {subprocess.py:92} INFO - 'lib = "/usr/local/lib/R/site-library"' is not writable
[2023-01-04, 16:57:58 UTC] {subprocess.py:92} INFO - Error in install.packages("httr") : unable to install packages
[2023-01-04, 16:57:58 UTC] {subprocess.py:92} INFO - Execution halted
[2023-01-04, 16:57:58 UTC] {subprocess.py:96} INFO - Command exited with return code 1
You are running into errors during compilation that are causing cascading errors. When in trouble building R images, since the docker build process often masks/hides some of the real error messages, I run a container before the installation phase to see what's going on. If we do that, we'll see errors such as:
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/airflow/R/x86_64-pc-linux-gnu-library/4.0/curl’
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
--------------------------- [ANTICONF] --------------------------------
Configuration failed because openssl was not found. Try installing:
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: openssl (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
tools/version.c:1:10: fatal error: openssl/opensslv.h: No such file or directory
1 | #include <openssl/opensslv.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
* removing ‘/home/airflow/R/x86_64-pc-linux-gnu-library/4.0/openssl’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/airflow/R/x86_64-pc-linux-gnu-library/4.0/httr’
The downloaded source packages are in
‘/tmp/Rtmp9dyEo5/downloaded_packages’
When you see this, it should be clear: you have OS-level dependencies that are not met. While the CRAN page for httr is uninformative here, know that it relies on curl, which lists:
SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb).
If you dive a little deeper, you'll see that we need to add that package as well as libssl-dev.
I only tested against the initial few portions of your Dockerfile, but I was able to build this and confirm that R sees these two new packages. (I also took the liberty of installing both packages in one RUN line, thinking that fewer images in the build process was a good thing.)
ARG AIRFLOW_VERSION=2.3.3
ARG PYTHON_RUNTIME_VERSION=3.8
FROM apache/airflow:${AIRFLOW_VERSION}-python${PYTHON_RUNTIME_VERSION}
SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]
USER 0
RUN apt-get update && apt-get install -y r-base r-base-core r-base-dev \
libcurl4-openssl-dev libssl-dev && \
rm -r /var/lib/apt/lists/*
RUN R -e "install.packages(c('httr', 'jsonlite'), repos='https://cran.rstudio.com/')"
The build:
$ docker build -t myimage .
[+] Building 20.5s (7/7) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 474B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/apache/airflow:2.3.3-python3.8 0.7s
=> [1/3] FROM docker.io/apache/airflow:2.3.3-python3.8#sha256:3a17e765ce209eb6cc551518f3b7ad5e2126d509ca8bdd35232ed2d35f801049 0.0s
=> CACHED [2/3] RUN apt-get update && apt-get install -y r-base r-base-core r-base-dev libcurl4-openssl-dev libssl-dev && rm -r /var/lib/apt/lists/* 0.0s
=> [3/3] RUN R -e "install.packages(c('httr', 'jsonlite'), repos='https://cran.rstudio.com/')" 19.6s
=> exporting to image 0.2s
=> => exporting layers 0.1s
=> => writing image sha256:6271d7deb41211a7fa603a086f8cc24d1249d831546e2fec0293d87d14558312 0.0s
=> => naming to docker.io/library/myimage
Confirm:
$ docker run -it --rm myimage bash
The container is run as root user. For security, consider using a regular user account.
root#10f43b1bd4c2:/opt/airflow# ls /usr/local/lib/R/site-library/
R6 askpass curl httr jsonlite mime openssl sys
root#10f43b1bd4c2:/opt/airflow# R
R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> packageVersion("httr")
[1] ‘1.4.4’
> packageVersion("jsonlite")
[1] ‘1.8.4’
> q("no")
I am getting the below error when trying to execute the robotframework test scripts.
Parent suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Tests.Suites.Layer2.Dhl.Dhl Session | FAIL |
Suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Below are the list of files installed:
I installed python 3.10.5
C:\aoswebtest>pip list
Package Version
async-generator 1.10
attrs 21.4.0
bcrypt 3.2.2
certifi 2022.5.18.1
cffi 1.15.0
cryptography 36.0.1
et-xmlfile 1.1.0
h11 0.13.0
idna 3.3
openpyxl 3.0.9
outcome 1.1.0
paramiko 2.11.0
pip 22.0.4
pycparser 2.21
pydevd 2.7.0
PyNaCl 1.5.0
pyOpenSSL 22.0.0
PyYAML 6.0
robotframework 4.1.3
robotframework-pythonlibcore 3.0.0
robotframework-seleniumlibrary 6.0.0
robotframework-sshlibrary 3.8.0
scapy 2.4.5
scp 0.14.4
selenium 4.1.0
setuptools 58.1.0
six 1.16.0
sniffio 1.2.0
sortedcontainers 2.4.0
trio 0.20.0
trio-websocket 0.9.2
urllib3 1.26.9
webcolors 1.11.1
wsproto 1.1.0
xlrd 2.0.1
Can you anyone help my with this?
I have the same error. I used my pc and run selenium with firefox then it works fine. But when I copy code and run other pc, it shows error NS_BINDING_ABORTED.
I fix it by: downgrade firefox version(from 103.x.x -> 92.x.x)
> install.packages("ragg")
trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.1.3.tar.gz'
Content type 'application/x-gzip' length 420401 bytes (410 KB)
==================================================
downloaded 410 KB
Welcome at Tue Aug 17 23:24:09 2021
Library path: /home/roy/miniconda3/envs/r-4.1/lib/R/library
Repositories set.
R_MAX_NUM_DLLS set to 1000.
* installing *source* package ‘ragg’ ...
** package ‘ragg’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu
Using PKG_LIBS=-lfreetype -lpng16 -lm -lz -lm -lz -ltiff -lwebp -lzstd -llzma -ljbig -ljpeg -lz -lm
-----------------------------[ ANTICONF ]-------------------------------
Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
* deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
* rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
* csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
If freetype2 libpng libtiff-4 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2 libpng libtiff-4.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:194,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/libpng16/pngconf.h:31,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:492:49: error: missing binary operator before token "("
492 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
| ^
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
from /usr/include/libpng16/pngconf.h:46,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
228 | #if __GLIBC_USE (DEPRECATED_GETS)
| ^
--------------------------------------------------------------------
ERROR: configuration failed for package ‘ragg’
* removing ‘/home/roy/miniconda3/envs/r-4.1/lib/R/library/ragg’
The downloaded source packages are in
‘/tmp/RtmpL1ZZnL/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("ragg") :
installation of package ‘ragg’ had non-zero exit status
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.0 (2021-05-18)
#> os Ubuntu 20.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/Stockholm
#> date 2021-08-17
This issue happens in a conda environment. The suggested linux libraries are installed (see below, run in the same conda env).
sudo apt-get install -y libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libjpeg-dev is already the newest version (8c-2ubuntu8).
libpng-dev is already the newest version (1.6.37-2).
libfreetype6-dev is already the newest version (2.10.1-2ubuntu0.1).
libtiff5-dev is already the newest version (4.1.0+git191117-2ubuntu0.20.04.1).
0 to upgrade, 0 to newly install, 0 to remove and 26 not to upgrade.
ragg installation outside the conda env works fine. My guess is that when installing from the conda env, it doesn't find the path to something. Any tips?
It looks like something connected to this question answer. I encountered the same issue when was trying to install "ragg" package inside my conda env, and the suggested fix in the log (mentioned by #BlackBear answer) is not the real cause of the issue, the issue's cause is showed below in the log:
-------------------------- [ERROR MESSAGE] ---------------------------
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:194,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/libpng16/pngconf.h:31,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:492:49: error: missing binary operator before token "("
492 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
| ^
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
from /usr/include/libpng16/pngconf.h:46,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
228 | #if __GLIBC_USE (DEPRECATED_GETS)
| ^
--------------------------------------------------------------------
And it is maybe somehow connected to macros definition confusing. I'm not a big specialist in glibc and other things, for me the suggestion from the #MrFlick in comments to the question to install package directly via conda worked (mamba install -c conda-forge r-ragg)
The solution is in the log:
Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
* deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
* rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
* csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
Install those packages and try again.
I saw the same error. The fix is to install pkg-config to the conda environment:
conda install -c conda-forge pkg-config
Somehow it seems that R c compiler under conda environment can not call system pkg-config correctly.
Newbie trying to get going with IJulia on Debian Jessie, and am stuck with an error. Don't know how to interpret the message, and not actually sure on what to do next.
The beginning is all ok :
julia> Pkg.init()
INFO: Initializing package repository /home/sybs/.julia/v0.3
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
julia> Pkg.add("IJulia")
INFO: Cloning cache of BinDeps from git://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Conda from git://github.com/Luthaf/Conda.jl.git
INFO: Cloning cache of Dates from git://github.com/quinnj/Dates.jl.git
INFO: Cloning cache of HttpCommon from git://github.com/JuliaWeb/HttpCommon.jl.git
INFO: Cloning cache of IJulia from git://github.com/JuliaLang/IJulia.jl.git
INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
INFO: Cloning cache of Nettle from git://github.com/staticfloat/Nettle.jl.git
INFO: Cloning cache of SHA from git://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of URIParser from git://github.com/JuliaWeb/URIParser.jl.git
INFO: Cloning cache of ZMQ from git://github.com/JuliaLang/ZMQ.jl.git
INFO: Installing BinDeps v0.3.21
INFO: Installing Compat v0.7.11
INFO: Installing Conda v0.1.9
INFO: Installing Dates v0.3.2
INFO: Installing HttpCommon v0.1.2
INFO: Installing IJulia v1.1.8
INFO: Installing JSON v0.5.0
INFO: Installing Nettle v0.2.2
INFO: Installing SHA v0.1.2
INFO: Installing URIParser v0.0.7
INFO: Installing ZMQ v0.3.1
INFO: Building Nettle
INFO: Building ZMQ
INFO: Building IJulia
INFO: Installing Jupyter via the Conda package.
INFO: Downloading miniconda installer ...
--2016-02-23 14:43:46-- http://repo.continuum.io/miniconda/Miniconda-3.9.1-Linux-x86_64.sh
Résolution de repo.continuum.io (repo.continuum.io)… 23.21.205.0, 174.129.25.1
Connexion à repo.continuum.io (repo.continuum.io)|23.21.205.0|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 23531867 (22M) [application/octet-stream]
Sauvegarde en : « /home/sybs/.julia/v0.3/Conda/deps/usr/installer.sh »
home/sybs/.julia/v0. 48%[=========> ] 10,86M 16,4KB/s eta 14m 14s/home/sybs/.julia/v 100%[=====================>] 22,44M 13,8KB/s ds 29m 43ss
Then I get a "chmod not defined" error :
INFO: Installing miniconda ...
===============================[ ERROR: IJulia ]================================
chmod not defined
while loading /home/sybs/.julia/v0.3/IJulia/deps/build.jl, in expression starting on line 35
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: IJulia had build errors.
- packages with build errors remain installed in /home/sybs/.julia/v0.3
- build a package and all its dependencies with `Pkg.build(pkg)`
- build a single package by running its `deps/build.jl` script
================================================================================
INFO: Package database updated
I opened up the build.jl file and scroll before and after line35 and got this :
if jupyter_vers < v"3.0" || dirname(jupyter) == abspath(Conda.SCRIPTDIR)
info("Installing Jupyter via the Conda package.")
Conda.add("jupyter")
jupyter = abspath(Conda.SCRIPTDIR,"jupyter")
jupyter_vers = prog_version(jupyter)
jupyter_vers < v"3.0" && error("failed to find $jupyter 3.0 or later")
end
info("Found Jupyter version $jupyter_vers: $jupyter")
#######################################################################
# Warn people upgrading from older IJulia versions:
try
juliaprof = chomp(readall(pipeline(`$ipython locate profile julia`,
stderr=DevNull)))
warn("""You should now run IJulia just via `$jupyter notebook`, without
the `--profile julia` flag. IJulia no longer maintains the profile.
Consider deleting $juliaprof""")
end
#######################################################################
# Install Jupyter kernel-spec file.
So, what shall I do next ? chmod a+x build.jl ? then Pkg.build("IJulia") ?
Conda.jl author here. I do not have enough reputation to comment, so here is an answer.
Conda is tested on the latest julia 0.3, which is 0.3.12, and works there. So a possible fix would be to update your Julia version to either that or 0.4.
You can also try to install it manually, by making it executable and then running ./installer.sh -b -f -p $HOME/.julia/v0.3/Conda/deps/usr/.
I am trying to install R with Rstudio on an Amazon AWS AMI. It currently ships R-3.1 and I would like it to have R-3.2. I am currently using 2013.03 release but the new 2015 version also doesn't have the right version.
The yum install R command won't upgrade it.
root#ip-172-31-3-136 tmp]$ sudo yum install R
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest
| 2.1 kB 00:00
amzn-updates/latest
| 2.3 kB 00:00
704 packages excluded due to repository priority protections
Package R-3.1.1-3.18.amzn1.x86_64 already installed and latest version
Nothing to do
I figured I'd add another rpm repo, so I download the rpm list from the most recent CentOS.
wget http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo yum localinstall epel-release-7-5.noarch.rpm
sudo yum install R
This also doesn't work and gives me a list of errors like:
Error: Package: python26-2.6.9-1.80.amzn1.x86_64 (#amzn-updates)
Requires: libdb-4.7.so()(64bit)
Removing: db4-4.7.25-17.10.amzn1.x86_64 (installed)
libdb-4.7.so()(64bit)
Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
~libdb-4.8.so()(64bit)
Updated By: db4-4.7.25-18.11.amzn1.x86_64 (amzn-main)
libdb-4.7.so()(64bit)
Error: libdb4 conflicts with filesystem-2.4.30-3.8.amzn1.x86_64
Error: Package: rpm-python26-4.11.2-2.64.amzn1.x86_64 (#amzn-updates)
Requires: libdb-4.7.so()(64bit)
Removing: db4-4.7.25-17.10.amzn1.x86_64 (installed)
libdb-4.7.so()(64bit)
Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
~libdb-4.8.so()(64bit)
Updated By: db4-4.7.25-18.11.amzn1.x86_64 (amzn-main)
libdb-4.7.so()(64bit)
Error: Package: httpd-2.2.29-1.5.amzn1.x86_64 (#amzn-main)
Requires: libdb-4.7.so()(64bit)
Removing: db4-4.7.25-17.10.amzn1.x86_64 (installed)
libdb-4.7.so()(64bit)
Obsoleted By: libdb4-4.8.30-13.el7.x86_64 (epel)
~libdb-4.8.so()(64bit)
Updated By: db4-4.7.25-18.11.amzn1.x86_64 (amzn-main)
libdb-4.7.so()(64bit)
I am trying to install R as part of a provisioning script so preferably I would be able to to not have to install from source as this takes a LONG time.
The --enablerepo=epel trick also does not work either.
root#ip-172-31-3-136 tmp]$ sudo yum install R --enablerepo=epel
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
704 packages excluded due to repository priority protections
Package R-3.1.1-3.18.amzn1.x86_64 already installed and latest version
Nothing to do
This all seems very confusing as the following script does work on a CENTOS 7 box when I start it on digital ocean:
[root#servy-server ~]# yum install -y epel-release
[root#servy-server ~]# yum update -y
[root#servy-server ~]# yum install -y R
[root#servy-server ~]# R
The latest Amazon AWS AMI now ships with R version 3.2.