Giter Site home page Giter Site logo

Comments (5)

jeffreyhanson avatar jeffreyhanson commented on May 17, 2024 2

Based on this output, it looks like you need to install a system package to install git2r:

The OpenSSL library that is required to
build git2r was not found.

Please install:
libssl-dev (package on e.g. Debian and Ubuntu)
openssl-devel (package on e.g. Fedora, CentOS and RHEL)
openssl (Homebrew package on OS X)
and try again.

On Ubuntu systems, you can install this system package by running this command in the terminal:

sudo apt-get update && sudo apt-get install libssl-dev

After running this, try installing the git2r R package, and then if that works, installing devtools and then prioritizr.

from prioritizr.

jeffreyhanson avatar jeffreyhanson commented on May 17, 2024

It looks like you're having problems installing the devtools R package, and this is failing because it's trying to install the git2r R which devtools depends on.

What happens if you try installing the git2r R package?

from prioritizr.

momeni133 avatar momeni133 commented on May 17, 2024

`> install.packages("git2r")
Installing package into ‘/home/iman/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
--2017-11-12 09:05:53-- https://cran.rstudio.com/src/contrib/git2r_0.19.0.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.92.199
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.92.199|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1155950 (1,1M) [application/x-gzip]
Saving to: ‘/tmp/RtmpaAVEPR/downloaded_packages/git2r_0.19.0.tar.gz’

 0K .......... .......... .......... .......... ..........  4% 1,10M 1s
50K .......... .......... .......... .......... ..........  8% 2,64M 1s

100K .......... .......... .......... .......... .......... 13% 3,61M 0s
150K .......... .......... .......... .......... .......... 17% 7,45M 0s
200K .......... .......... .......... .......... .......... 22% 6,85M 0s
250K .......... .......... .......... .......... .......... 26% 3,75M 0s
300K .......... .......... .......... .......... .......... 31% 11,6M 0s
350K .......... .......... .......... .......... .......... 35% 10,5M 0s
400K .......... .......... .......... .......... .......... 39% 15,5M 0s
450K .......... .......... .......... .......... .......... 44% 9,83M 0s
500K .......... .......... .......... .......... .......... 48% 32,3M 0s
550K .......... .......... .......... .......... .......... 53% 3,60M 0s
600K .......... .......... .......... .......... .......... 57% 15,2M 0s
650K .......... .......... .......... .......... .......... 62% 20,5M 0s
700K .......... .......... .......... .......... .......... 66% 15,8M 0s
750K .......... .......... .......... .......... .......... 70% 21,1M 0s
800K .......... .......... .......... .......... .......... 75% 18,4M 0s
850K .......... .......... .......... .......... .......... 79% 52,2M 0s
900K .......... .......... .......... .......... .......... 84% 27,8M 0s
950K .......... .......... .......... .......... .......... 88% 27,4M 0s
1000K .......... .......... .......... .......... .......... 93% 26,7M 0s
1050K .......... .......... .......... .......... .......... 97% 70,3M 0s
1100K .......... .......... ........ 100% 28,2M=0,2s

2017-11-12 09:05:53 (7,03 MB/s) - ‘/tmp/RtmpaAVEPR/downloaded_packages/git2r_0.19.0.tar.gz’ saved [1155950/1155950]

  • installing source package ‘git2r’ ...
    ** package ‘git2r’ successfully unpacked and MD5 sums checked
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -std=gnu99 -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking size of void*... 8
    checking for library containing inflate... -lz
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for libssl... no
    configure: WARNING: "pkg-config failed to find libssl."
    checking for library containing EVP_EncryptInit... no
    configure: error: in `/tmp/RtmpkrlJm4/R.INSTALLe2b13559cb2/git2r':
    configure: error:

    The OpenSSL library that is required to
    build git2r was not found.

    Please install:
    libssl-dev (package on e.g. Debian and Ubuntu)
    openssl-devel (package on e.g. Fedora, CentOS and RHEL)
    openssl (Homebrew package on OS X)
    and try again.

    If the OpenSSL library is installed on
    your system but the git2r configuration
    is unable to find it, you can specify
    the include and lib path to OpenSSL with:
    R CMD INSTALL --configure-args='--with-libssl-include=INCLUDE_PATH --with-libssl-lib=LIB_PATH' git2r

See `config.log' for more details
ERROR: configuration failed for package ‘git2r’

  • removing ‘/home/iman/R/x86_64-pc-linux-gnu-library/3.2/git2r’
    Warning in install.packages :
    installation of package ‘git2r’ had non-zero exit status`

from prioritizr.

momeni133 avatar momeni133 commented on May 17, 2024

Dear Jeffrey
Thank you
I installed this system package but after this I also received the same errors for other system packages (more than 5!). I Installed all of them using "synoptic package manager". After this step, prioritizr installed without any problem.
I tried the test script which works on windows (slowly):
`
data(sim_pu_raster, sim_features)

# create base problem

p <- marxan_problem(sim_pu_raster, sim_features) %>%

add_min_set_objective() %>%

add_relative_targets(0.1) %>%

add_binary_decisions() %>%

add_rsymphony_solver()

# define blms

blms <- c(0, 0.1, 100)

# create a list with the solutions

results <- lapply(blms, function(x) {
p %>% add_boundary_penalties(x, edge_factor = 0.5) %>% solve()
})
`

but in Linux I received an error as below. excuse me for my numerous questions.

"Error in add_relative_targets(., targets) :
argument "targets" is missing, with no default
In addition: Warning message:
In if (targets_type == "relative") p <- p %>% add_relative_targets(targets) :
the condition has length > 1 and only the first element will be used"

from prioritizr.

ricschuster avatar ricschuster commented on May 17, 2024

Instead of the marxan_problem function you need to use the problem function, then it should work:

# create base problem
p <- problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.1) %>%
add_binary_decisions() %>%
add_rsymphony_solver()

# define blms
blms <- c(0, 0.1, 100)

# create a list with the solutions
results <- lapply(blms, function(x) {
p %>% add_boundary_penalties(x, edge_factor = 0.5) %>% solve()
})

from prioritizr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.