4
respostas

Falha na instalação do package XML

Galera!

Alguém sabe como resolver o problema abaixo. Tentei instalar o package XML no MacOS e recebi o erro abaixo:

> install.packages('XML')

  There is a binary version available but the source version is later:
      binary    source needs_compilation
XML 3.98-1.9 3.98-1.16              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘XML’

trying URL 'https://cran.rstudio.com/src/contrib/XML_3.98-1.16.tar.gz'
Content type 'application/x-gzip' length 1599292 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2018g.1.0/zoneinfo/America/Sao_Paulo'
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR: configuration failed for package ‘XML’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/dg/x_r2w8vj6y3gb03pj4cq9jwh0000gn/T/RtmpPgas5W/downloaded_packages’
> library(httr)
> library(XML)
Error in library(XML) : there is no package called ‘XML’
> install.packages('XML')

  There is a binary version available but the source version is later:
      binary    source needs_compilation
XML 3.98-1.9 3.98-1.16              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘XML’

trying URL 'https://cran.rstudio.com/src/contrib/XML_3.98-1.16.tar.gz'
Content type 'application/x-gzip' length 1599292 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2018g.1.0/zoneinfo/America/Sao_Paulo'
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR: configuration failed for package ‘XML’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/dg/x_r2w8vj6y3gb03pj4cq9jwh0000gn/T/RtmpPgas5W/downloaded_packages’
> library(XML)
Error in library(XML) : there is no package called ‘XML’
> 
4 respostas

Abre esse config.log e joga o erro aqui para analisarmos.

Boa tarde André. Acredito que esse arquivo fique na pasta '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/XML', no entanto esse diretório é apagado quando o processo de instalação falha.

Estou sem ideias, preciso estudar mais sobre esse assunto e ver se compro um Macbook Pro na Black Friday rsrsrs. Só to acostumado a mecher no Windows e no Ubuntu. Algum instrutor poderia nos ajudar a chegar nessa solução?

André, desculpa. Realmente entendo a dificuldade em analisar o problema sem os logs. Pesquisei para ver se alguém já tinha passado por isso e não encontrei nada.

Mais uma vez, obrigado pela sua boa vontade, mas realmente o config.log foi apagado. Fiz um locate no S.O. e não encontrou nada.

Vamos ver se algum dos instrutores possam nos ajudar.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software