Установка серии на R-studio - PullRequest
0 голосов
/ 12 июля 2020

Я пытаюсь использовать пакет tseries на R-studio .

Выполняя импорт строки кода, я получаю сообщение об ошибке:

> library(tseries)
Error in library(tseries) : there is no package called ‘tseries’

Я попытался установить соответствующий пакет и получил следующий результат.

> install.packages("tseries", dependencies = TRUE)
Installing package into ‘/home/roberto/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘TTR’, ‘curl’, ‘quantmod’

trying URL 'https://cloud.r-project.org/src/contrib/TTR_0.23-6.tar.gz'
Content type 'application/x-gzip' length 309148 bytes (301 KB)
==================================================
downloaded 301 KB

trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz'
Content type 'application/x-gzip' length 673779 bytes (657 KB)
==================================================
downloaded 657 KB

trying URL 'https://cloud.r-project.org/src/contrib/quantmod_0.4.17.tar.gz'
Content type 'application/x-gzip' length 152204 bytes (148 KB)
==================================================
downloaded 148 KB

trying URL 'https://cloud.r-project.org/src/contrib/tseries_0.10-47.tar.gz'
Content type 'application/x-gzip' length 164796 bytes (160 KB)
==================================================
downloaded 160 KB

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
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/roberto/R/x86_64-pc-linux-gnu-library/3.6/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘TTR’
* removing ‘/home/roberto/R/x86_64-pc-linux-gnu-library/3.6/TTR’
Warning in install.packages :
  installation of package ‘TTR’ had non-zero exit status
ERROR: dependencies ‘TTR’, ‘curl’ are not available for package ‘quantmod’
* removing ‘/home/roberto/R/x86_64-pc-linux-gnu-library/3.6/quantmod’
Warning in install.packages :
  installation of package ‘quantmod’ had non-zero exit status
ERROR: dependency ‘quantmod’ is not available for package ‘tseries’
* removing ‘/home/roberto/R/x86_64-pc-linux-gnu-library/3.6/tseries’
Warning in install.packages :
  installation of package ‘tseries’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpUNGZv6/downloaded_packages’

Установка не удалась, при повторном импорте библиотеки я получаю ту же ошибку, что и раньше.

> library(tseries)
Error in library(tseries) : there is no package called ‘tseries’

Я также пробовал установить вручную curl, но это все равно не работает. Что я делаю не так? Как решить эту проблему?

1 Ответ

1 голос
/ 12 июля 2020

Проблема упоминается здесь:

Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)

У вас есть libcurl на вашем компьютере? Если нет, вам необходимо установить его, например,

sudo apt-get install libcurl4-openssl-dev

в вашем терминале (т.е. не R), если вы используете Debian, или установить другую библиотеку, если у вас другая ОС, как указано выше.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...