/ usr / bin / ld: не могу найти -lpq

Я только что переместил окна форм в Ubuntu. и я пытаюсь скачать дизель_кли на ржавчину. После извлечения всех ящиков в последнем случае выдает ошибку, что / usr / bin / ld: не может найти -lpq .

2
задан 4 June 2019 в 20:43

1 ответ

Команда ld сообщает, что не может найти библиотеку pq. man ld расскажет вам о:

   -l namespec
   --library=namespec
       Add the archive or object file specified by namespec to the list of files to link.
       This option may be used any number of times.  If namespec is of the form :filename, ld
       will search the library path for a file called filename, otherwise it will search the
       library path for a file called libnamespec.a.

       On systems which support shared libraries, ld may also search for files other than
       libnamespec.a.  Specifically, on ELF and SunOS systems, ld will search a directory for
       a library called libnamespec.so before searching for one called libnamespec.a.  (By
       convention, a ".so" extension indicates a shared library.)  Note that this behavior
       does not apply to :filename, which always specifies a file called filename.

Это говорит нам о том, что нужный вам файл называется libpq.so или libpq.a.

Вы должны увидеть, есть ли в вашей rust/diesel_cli среде libpq.so.

Отвечая на вопрос о системе упаковки libpq, можно увидеть:

$ apt-cache search libpq
libpq-dev - header files for libpq5 (PostgreSQL library)
libpq5 - PostgreSQL C client library
cl-pg - Common Lisp library that provides a socket level postgresql interface
golang-github-lib-pq-dev - pure Go postgres driver for Go’s database/sql package
libghc-postgresql-libpq-dev - low-level binding to libpq
libghc-postgresql-libpq-doc - low-level binding to libpq; documentation
libghc-postgresql-libpq-prof - low-level binding to libpq; profiling libraries
libpgtcl - Tcl client library binding for PostgreSQL
libpgtcl-dev - Tcl client library binding for PostgreSQL - development files
libpostgresql-ocaml - OCaml bindings to PostgreSQL's libpq (runtime)
libpostgresql-ocaml-dev - OCaml bindings to PostgreSQL's libpq
libpqtypes-dev - parameterized queries libpq extension - development
libpqtypes0 - parameterized queries libpq extension - shared library
libpqtypes0-dbg - parameterized queries libpq extension - debug symbols
libpqxx-3.1 - C++ library to connect to PostgreSQL
libpqxx-3.1-dbg - C++ library to connect to PostgreSQL (debugging symbols)
libpqxx-4.0 - C++ library to connect to PostgreSQL
libpqxx-dbg - C++ library to connect to PostgreSQL (debugging symbols)
libpqxx-dev - C++ library to connect to PostgreSQL (development files)
libpqxx-doc - C++ library to connect to PostgreSQL (documentation)
libpqxx3-dev - C++ library to connect to PostgreSQL (development files)
libpqxx3-doc - C++ library to connect to PostgreSQL (documentation)
python-pg8000 - Pure-Python PostgreSQL Driver
ruby-pg - PostgreSQL interface for Ruby

Проверьте документацию rust/diesel_cli на предмет требований к postgresql?

Я позволю вам сделать apt-cache search postgresql Вы сами, вместо добавления 452 строк в этот пост.

1
ответ дан 4 June 2019 в 20:43

Другие вопросы по тегам:

Похожие вопросы: