Hi, I appreciate your awesome bookdown package.
I have a deployment issue.
I tried to fix this error while 1 week, but I can't find a way to solve this problem.
2 weeks ago, I can deploy my book to the website below.
when I deploy my bookdown, there was an error message below.
I didn't use foreign library, but there was a Build error (failed to retrieve package sources).
[Connect] 2021/04/18 08:51:49.500098452 curl: (22) The requested URL returned error: 404
[Connect] 2021/04/18 08:51:50.568753166 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/foreign/foreign_0.8-81.tar.gz
[Connect] 2021/04/18 08:51:50.568765704 curl: (22) The requested URL returned error: 404
[Connect] 2021/04/18 08:51:51.576547818 FAILED
[Connect] 2021/04/18 08:51:51.576451572 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for foreign 0.8-81 from CRAN (internet connectivity issue?)
[Connect] 2021/04/18 08:51:51.576471446
[Connect] 2021/04/18 08:51:51.576523200 Unable to fully restore the R packages associated with this deployment.
[Connect] 2021/04/18 08:51:51.576524686 Please review the preceding messages to determine which package
[Connect] 2021/04/18 08:51:51.576536379 encountered installation difficulty and the cause of the failure.
[Connect] 2021/04/18 08:51:51.584796975 Warning message:
[Connect] 2021/04/18 08:51:51.584974807 In packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) :
[Connect] 2021/04/18 08:51:51.584980515 The most recent snapshot was generated using R version 4.0.5
[Connect] 2021/04/18 08:51:51.577409218 Error code: r-package-not-available
[Connect] An R package required by the content cannot be found in the package repository.
[Connect] Possible causes:
[Connect] * The R package being installed is not available for the version of R configured at Connect.
[Connect] * The R package being installed is not available for linux.
[Connect] * The client computer that published the content is using a different package repository from the Connect server, and the R package being installed is not available in the repository configured at the Connect server.
[Connect] * The package repository moved to a new URL after the content was published, and Connect is now attempting to rebuild the environment using the old package repository URL.
[Connect]
[Connect] Possible solutions:
[Connect] * Install a version of R on the Connect server that matches the one being used by the client computer. You can identify the required R version from the deployment logs, which will contain an entry similar to this:
> Bundle requested R version 3.5.0; using /usr/lib/R/bin/R which has version 3.4.4
In this example, the client computer has R 3.5.0 and the Connect server has R version 3.4.4. The recommended solution would be to install R version 3.5.0 on the Connect server alonside the existing 3.4.4 installation.
[Connect] * Replace usage of Windows-specific R packages with ones available for linux.
[Connect] * Configure the client with a package repository that is accessible via http(s) from the Connect server, such as CRAN or RStudio Package Manager. Reinstall the affected packages from the new repository and publish the content again.
[Connect]
[Connect] References:
[Connect] * https://docs.rstudio.com/connect/admin/getting-started/#installation
[Connect] * https://support.rstudio.com/hc/en-us/articles/360004067074-Managing-Packages-with-RStudio
[Connect]
[Connect] 2021/04/18 08:51:51.577409218 Additional data:
[Connect] Repository: 'CRAN'
[Connect] Package: 'foreign'
[Connect] PackageVersion: '0.8-81'
[Connect] Found in the following log entry:
[Connect] 2021/04/18 08:51:51.576451572 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for foreign 0.8-81 from CRAN (internet connectivity issue?)
[Connect] Build error: An R package required by the content cannot be found in the package repository. (r-package-not-available)
Site deployment failed with error: An R package required by the content cannot be found in the package repository. (r-package-not-available)