r-rust / gifski

R wrapper for the 'gifski' Rust Cargo crate.
Other
73 stars 4 forks source link

Unable to install R3.5.2 Mint Linux 19 #8

Closed KrollBio closed 5 years ago

KrollBio commented 5 years ago

Trying to install gifski for use with gganimate package. After successfully installing cargo and rust I ran the install command and received the following errors:

Note: Installing gifski via cargo install gifski worked without error

Downloading GitHub repo r-rust/gifski@master
✔  checking for file ‘/tmp/RtmpYkqO7q/remotes592f414b0fea/r-rust-gifski-6c1e18e/DESCRIPTION’ ...
─  preparing ‘gifski’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘gifski_0.8.6.1.tar.gz’

Installing package into ‘/home/kyle/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘gifski’ ...
Using /home/kyle/.cargo/bin/cargo (cargo 1.32.0 (8610973aa 2019-01-02))
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -pthread -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c wrapper.c -o wrapper.o
/home/kyle/.cargo/bin/cargo build --release --manifest-path=myrustlib/Cargo.toml
   Compiling version_check v0.1.4
   Compiling nodrop v0.1.12
   Compiling cfg-if v0.1.5
   Compiling cc v1.0.24
error: couldn't create a temp dir: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `cfg-if`.
warning: build failed, waiting for other jobs to finish...
error: couldn't create a temp dir: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `nodrop`.
warning: build failed, waiting for other jobs to finish...
error: couldn't create a temp dir: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `version_check`.
warning: build failed, waiting for other jobs to finish...
error: couldn't create a temp dir: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `cc`.

To learn more, run the command again with --verbose.
Makevars:15: recipe for target 'myrustlib/target/release/libmyrustlib.a' failed
make: *** [myrustlib/target/release/libmyrustlib.a] Error 101
ERROR: compilation failed for package ‘gifski’
* removing ‘/home/kyle/R/x86_64-pc-linux-gnu-library/3.5/gifski’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/RtmpYkqO7q/file592f2d14f383/gifski_0.8.6.1.tar.gz’ had non-zero exit status

R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 19

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0        rstudioapi_0.9.0  magrittr_1.5      usethis_1.4.0     devtools_2.0.1   
 [6] pkgload_1.0.2     R6_2.3.0          rlang_0.3.1       tools_3.5.2       pkgbuild_1.0.2   
[11] sessioninfo_1.1.1 cli_1.0.1         withr_2.1.2       remotes_2.0.2     assertthat_0.2.0 
[16] digest_0.6.18     rprojroot_1.3-2   crayon_1.3.4      processx_3.2.1    callr_3.1.1      
[21] fs_1.2.6          ps_1.3.0          curl_3.3          testthat_2.0.1    memoise_1.1.0    
[26] glue_1.3.0        compiler_3.5.2    desc_1.2.0        backports_1.1.3   prettyunits_1.0.2```
jeroen commented 5 years ago

This looks like a problem with your cargo installation: error: couldn't create a temp dir: No such file or directory (os error 2). Do you have a c compiler (gcc) installed?

KrollBio commented 5 years ago

This looks like a problem with your cargo installation: error: couldn't create a temp dir: No such file or directory (os error 2). Do you have a c compiler (gcc) installed?

Here is the gcc installed on my machine

kyle@kyle-XPS-13-9360 ~ $ gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
KrollBio commented 5 years ago

Issue resolved by manually installing cc via cargo install cc then proceeding with devtools::install_github("r-rust/gifski")