title: Install and load R packages from a packaged solution (Ubuntu)
body: <p>I have the following DESCRIPTION file:</p>
  
  <pre><code>Package: test
  Title: Test Project
  Version: 0.1
  Author: 
      person("First", "Last", email = "first.last@test.com", role = c("aut", "cre"))
  Maintainer: 
      First Last &lt;first.last@test.com&gt;
  Description: This is a template project.
  License: GPL
  Encoding: UTF-8
  LazyData: true
  Depends: 
      R (&gt;= 3.5.0)
  Imports:
      mongolite
  Suggests: 
      testthat
  </code></pre>
  
  <p>I need to import <code>mongolite</code>. Thus, I previously installed it using <code>requirements.R</code>:</p>
  
  <pre><code>dir.create("library")
  
  install.packages("testthat", lib="library")
  install.packages("mongolite", lib="library")
  </code></pre>
  
  <p>Then I executed <code>requirements.R</code> as follows:</p>
  
  <pre><code>Rscript --verbose requirements.R
  </code></pre>
  
  <p>To load packages, I do:</p>
  
  <pre><code>Rscript --verbose -e "devtools::load_all()"
  </code></pre>
  
  <p>This is when I get the error:</p>
  
  <pre><code>Error: Dependency package(s) 'mongolite' not available.
  &lt;error/rlang_error&gt;
  Dependency package(s) 'mongolite' not available.
  Backtrace:
      █
   1. └─devtools::load_all()
   2.   └─pkgload::load_all(...)
   3.     └─pkgload:::load_imports(path)
   4.       └─pkgload:::abort_for_missing_packages(res, imports$package)
  In addition: Warning message:
  In (function (dep_name, dep_ver = "*")  :
    Dependency package 'mongolite' not available.
  Execution halted
  </code></pre>
  
  <p>What is wrong in my setup?</p>