DyfanJones / noctua

Connect R to Athena using paws SDK (DBI Interface)
https://dyfanjones.github.io/noctua/
Other
45 stars 5 forks source link

Unable to install Noctua on EC2 instance #103

Closed chrissuh17 closed 4 years ago

chrissuh17 commented 4 years ago

Hello Dyfan,

I am running RStudio on an Amazon Linux EC2 instance, and I am getting this error message when attempting to install the noctua package.

I am currently running this analysis through this link (http://localhost:8787/).

install.packages("noctua")
Installing package into ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘openssl’, ‘httr’, ‘xml2’, ‘paws.common’, ‘paws.compute’, ‘paws.storage’, ‘paws.database’, ‘paws.networking’, ‘paws.management’, ‘paws.machine.learning’, ‘paws.analytics’, ‘paws.security.identity’, ‘paws.application.integration’, ‘paws.cost.management’, ‘paws.customer.engagement’, ‘paws’

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

trying URL 'https://cran.rstudio.com/src/contrib/openssl_1.4.2.tar.gz'
Content type 'application/x-gzip' length 1204168 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/httr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 159950 bytes (156 KB)
==================================================
downloaded 156 KB

trying URL 'https://cran.rstudio.com/src/contrib/xml2_1.3.2.tar.gz'
Content type 'application/x-gzip' length 271876 bytes (265 KB)
==================================================
downloaded 265 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.common_0.3.3.tar.gz'
Content type 'application/x-gzip' length 63406 bytes (61 KB)
==================================================
downloaded 61 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.compute_0.1.9.tar.gz'
Content type 'application/x-gzip' length 864214 bytes (843 KB)
==================================================
downloaded 843 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.storage_0.1.9.tar.gz'
Content type 'application/x-gzip' length 385287 bytes (376 KB)
==================================================
downloaded 376 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.database_0.1.9.tar.gz'
Content type 'application/x-gzip' length 628403 bytes (613 KB)
==================================================
downloaded 613 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.networking_0.1.9.tar.gz'
Content type 'application/x-gzip' length 475508 bytes (464 KB)
==================================================
downloaded 464 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.management_0.1.9.tar.gz'
Content type 'application/x-gzip' length 842090 bytes (822 KB)
==================================================
downloaded 822 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.machine.learning_0.1.9.tar.gz'
Content type 'application/x-gzip' length 424388 bytes (414 KB)
==================================================
downloaded 414 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.analytics_0.1.9.tar.gz'
Content type 'application/x-gzip' length 465442 bytes (454 KB)
==================================================
downloaded 454 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.security.identity_0.1.9.tar.gz'
Content type 'application/x-gzip' length 887814 bytes (867 KB)
==================================================
downloaded 867 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.application.integration_0.1.9.tar.gz'
Content type 'application/x-gzip' length 178463 bytes (174 KB)
==================================================
downloaded 174 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.cost.management_0.1.9.tar.gz'
Content type 'application/x-gzip' length 66152 bytes (64 KB)
==================================================
downloaded 64 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws.customer.engagement_0.1.9.tar.gz'
Content type 'application/x-gzip' length 202482 bytes (197 KB)
==================================================
downloaded 197 KB

trying URL 'https://cran.rstudio.com/src/contrib/paws_0.1.9.tar.gz'
Content type 'application/x-gzip' length 360692 bytes (352 KB)
==================================================
downloaded 352 KB

trying URL 'https://cran.rstudio.com/src/contrib/noctua_1.8.0.tar.gz'
Content type 'application/x-gzip' length 381011 bytes (372 KB)
==================================================
downloaded 372 KB

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
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@1.1 (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
 #include <openssl/opensslv.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/openssl’
Warning in install.packages :
  installation of package ‘openssl’ had non-zero exit status
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lxml2
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
 * deb: libxml2-dev (Debian, Ubuntu, etc)
 * rpm: libxml2-devel (Fedora, CentOS, RHEL)
 * csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.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 ‘xml2’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/xml2’
Warning in install.packages :
  installation of package ‘xml2’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/httr’
Warning in install.packages :
  installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘xml2’ are not available for package ‘paws.common’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.common’
Warning in install.packages :
  installation of package ‘paws.common’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.compute’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.compute’
Warning in install.packages :
  installation of package ‘paws.compute’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.storage’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.storage’
Warning in install.packages :
  installation of package ‘paws.storage’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.database’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.database’
Warning in install.packages :
  installation of package ‘paws.database’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.networking’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.networking’
Warning in install.packages :
  installation of package ‘paws.networking’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.management’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.management’
Warning in install.packages :
  installation of package ‘paws.management’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.machine.learning’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.machine.learning’
Warning in install.packages :
  installation of package ‘paws.machine.learning’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.analytics’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.analytics’
Warning in install.packages :
  installation of package ‘paws.analytics’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.security.identity’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.security.identity’
Warning in install.packages :
  installation of package ‘paws.security.identity’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.application.integration’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.application.integration’
Warning in install.packages :
  installation of package ‘paws.application.integration’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.cost.management’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.cost.management’
Warning in install.packages :
  installation of package ‘paws.cost.management’ had non-zero exit status
ERROR: dependency ‘paws.common’ is not available for package ‘paws.customer.engagement’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws.customer.engagement’
Warning in install.packages :
  installation of package ‘paws.customer.engagement’ had non-zero exit status
ERROR: dependencies ‘paws.compute’, ‘paws.storage’, ‘paws.database’, ‘paws.networking’, ‘paws.management’, ‘paws.machine.learning’, ‘paws.analytics’, ‘paws.security.identity’, ‘paws.application.integration’, ‘paws.cost.management’, ‘paws.customer.engagement’ are not available for package ‘paws’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/paws’
Warning in install.packages :
  installation of package ‘paws’ had non-zero exit status
ERROR: dependency ‘paws’ is not available for package ‘noctua’
* removing ‘/home/ec2-user/R/x86_64-redhat-linux-gnu-library/3.4/noctua’
Warning in install.packages :
  installation of package ‘noctua’ had non-zero exit status

My apologies for the long error message; I wanted to provide as much context as possible.

I am fairly new to the tech industry and am wondering if this is a noctua specific problem? If so, any advice is greatly appreciated.

DyfanJones commented 4 years ago

Hi @chrissuh17,

It looks like you don't have openssl, libcurl, libxml-2.0 installed. These are required for the dependent package paws

# Paws:
If you are using Linux, you will need to install the following OS packages:

    Debian/Ubuntu: libcurl4-openssl-dev libssl-dev libxml2-dev
    CentOS/Fedora/Red Hat: libcurl-devel libxml2-devel openssl-devel

You should be able to install them with the following command (note this command is to be ran on the terminal and not from R):

sudo yum install -y https://repo.ius.io/ius-release-el7.rpm \
   && sudo yum update -y \
   && sudo yum install -y libcurl-devel libxml2-devel openssl-devel

If you are using docker for your ec2 please feel free to modify the Docker file example. I have use centos7 however amazon linux uses the same package manager yum

Once openssl, libcurl, libxml-2.0 are installed please try to re-install noctua. I hope this helps.

chrissuh17 commented 4 years ago

Thank you for your reply!

I tried the command ```[ec2-user@ip-172-31-59-68 ~]$ sudo yum install -y https://repo.ius.io/ius-release-el7.rpm \

&& sudo yum update -y \ && sudo yum install -y libcurl-devel libxml2-devel openssl-devel```

And am now receiving this error from Terminal.

Loaded plugins: priorities, update-motd, upgrade-helper
ius-release-el7.rpm                                                                          | 8.2 kB  00:00:00     
Examining /var/tmp/yum-root-igFpnA/ius-release-el7.rpm: ius-release-2-1.el7.ius.noarch
Marking /var/tmp/yum-root-igFpnA/ius-release-el7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package ius-release.noarch 0:2-1.el7.ius will be installed
--> Processing Dependency: epel-release = 7 for package: ius-release-2-1.el7.ius.noarch
--> Finished Dependency Resolution
Error: Package: ius-release-2-1.el7.ius.noarch (/ius-release-el7)
           Requires: epel-release = 7
           Installed: epel-release-6-8.9.amzn1.noarch (installed)
               epel-release = 6-8.9.amzn1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Would you have suggestions for this issue?

*edit: I changed the command to level 6

sudo yum install -y https://repo.ius.io/ius-release-el6.rpm \
   && sudo yum update -y \
   && sudo yum install -y libcurl-devel libxml2-devel openssl-devel

And it successfully installed on Terminal.

DyfanJones commented 4 years ago

@chrissuh17

Did your edit fix this issue of install libcurl-devel libxml2-devel openssl-devel?

*edit: I changed the command to level 6

sudo yum install -y https://repo.ius.io/ius-release-el6.rpm \
   && sudo yum update -y \
   && sudo yum install -y libcurl-devel libxml2-devel openssl-devel

And it successfully installed on Terminal.

If so are you able to install noctua?

chrissuh17 commented 4 years ago

I have just successfully installed noctua!

Thank you so much for your help. This was invaluable.

DyfanJones commented 4 years ago

No worries, glad I helped :D