Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

688
Views
No se puede instalar la gema `pg` en CentOS 7 VM

No puedo instalar la gema pg en un servidor AWS EC2 que ejecuta CentOS 7. Estoy razonablemente seguro de que no hay problemas con mi instalación de Ruby (2.7.0), gemset, RVM, etc. y recibo el mensaje de error abajo. He instalado postgresql , postgresql-devel , postgresql-libs y postgresql-server como se sugiere en preguntas similares aquí. Postgres es 9.2.24 que debería ser compatible con la gema pg .

También intenté especificar el archivo pg_conf e instalarlo con el comando gem install pg -- --with-pg-config=/usr/bin/pg_config y recibí el mismo error.

He encontrado problemas en el pasado al intentar instalar pg en Mac y otros sistemas Linux, pero este error es nuevo para mí. Me estoy golpeando la cabeza contra la pared.

 current directory: /home/MY_USERNAME/.rvm/gems/ruby-2.7.0@GEMSET_NAME/gems/pg-1.2.3/ext /home/MY_USERNAME/.rvm/rubies/ruby-2.7.0/bin/ruby -I /home/MY_USERNAME/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0 -r ./siteconf20200714-11146-p34b9c.rb extconf.rb checking for pg_config... yes Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... yes checking for PQsetSingleRowMode()... yes checking for PQconninfo()... no checking for PQsslAttribute()... no checking for PQresultVerboseErrorMessage()... no checking for PQencryptPasswordConn()... no checking for PQresultMemorySize()... no checking for timegm()... yes checking for rb_gc_adjust_memory_usage()... yes checking for unistd.h... yes checking for inttypes.h... yes checking for C99 variable length arrays... yes creating extconf.h creating Makefile current directory: /home/MY_USERNAME/.rvm/gems/ruby-2.7.0@GEMSET_NAME/gems/pg-1.2.3/ext make "DESTDIR=" clean current directory: /home/MY_USERNAME/.rvm/gems/ruby-2.7.0@GEMSET_NAME/gems/pg-1.2.3/ext make "DESTDIR=" compiling gvl_wrappers.c compiling pg.c compiling pg_binary_decoder.c compiling pg_binary_encoder.c compiling pg_coder.c compiling pg_connection.c compiling pg_copy_coder.c compiling pg_errors.c compiling pg_record_coder.c compiling pg_result.c compiling pg_text_decoder.c compiling pg_text_encoder.c compiling pg_tuple.c compiling pg_type_map.c compiling pg_type_map_all_strings.c compiling pg_type_map_by_class.c compiling pg_type_map_by_column.c compiling pg_type_map_by_mri_type.c compiling pg_type_map_by_oid.c compiling pg_type_map_in_ruby.c compiling pg_util.c linking shared-object pg_ext.so /usr/bin/ld: unrecognized option '--compress-debug-sections=zlib' /usr/bin/ld: use the --help option for usage information collect2: error: ld returned 1 exit status make: *** [pg_ext.so] Error 1 make failed, exit code 2
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Encontré la respuesta de la respuesta de Max .

El problema era con ld , no con postgres. Mi versión ld ( ld -v era anticuada e hice una actualización completa del sistema ( sudo yum upgrade ) que actualizó los binutils de GNU (de los cuales ld es una parte) y ahora puedo instalar pg sin problemas.

over 4 years ago · Santiago Trujillo Report

0

Este enlace aquí contenía comandos que funcionaron para mí. Concretamente estas líneas -->

 [ -f `/usr/pgsql-12/bin/pg_config --includedir`/libpq-fe.h ] && echo "devel installed" || echo "devel missing" # scl-rh for llvm-toolset-7-clang 4.0.1 yum -y install centos-release-scl-rh yum-config-manager --disable centos-sclo-rh yum -y install postgresql12-devel --enablerepo=centos-sclo-rh
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!