Open billdenney opened 1 year ago
I traced it back to a much simpler reprex, the daff
package is no longer on CRAN, so this reprex gives the same error.
pak::pkg_install("daff")
I think that changes the request to be:
In this case, I had to determine the package that wasn't working by bifurcation. A note for what package is giving the subprocess error would be very helpful.
I see this for daff:
❯ pak::pkg_install("daff")
✔ Updated metadata database: 5.02 MB in 6 files.
✔ Updating metadata database ... done
→ Will install 1 package.
→ Will download 1 CRAN package (1.74 MB).
+ daff 0.3.5 ⬇ (1.74 MB)
ℹ Getting 1 pkg (1.74 MB)
✖ Failed to download daff 0.3.5 (aarch64-apple-darwin20)
✖ Failed to download 1 package.
Error:
! error in pak subprocess
Caused by error:
! Failed to download daff from `https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/daff_0.3.5.tgz` and `https://mac.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/daff_0.3.5.tgz`.
Type .Last.error to see the more details.
I guess it was just archived, and the CRAN metadata is inconsistent.
For an archived/non-existent package I get this:
❯ pak::pkg_install("qwertyqwerty")
Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* qwertyqwerty: Can't find package called qwertyqwerty.
Type .Last.error to see the more details.
How would you improve this?
Hi @gaborcsardi, apologies, I thought that my reprex was self-contained but it was not. I had set the MRAN repo as well, and that makes the error different. I agree that the errors you're seeing above are good. Here is the reprex I'm getting now with the current CRAN version of pak
(version 0.3.1):
pak::repo_add("MRAN@2022-12-05")
pak::pkg_install("daff")
#> ℹ Loading metadata databaseℹ Loading metadata database✔ Loading metadata database ... done✔ Loading metadata database ... done
#> Error: ! error in pak subprocess
#> Caused by error:
#> ! invalid version specification 'NA'
Created on 2022-12-06 with reprex v2.0.2
I see that you're using a mac while I'm on Windows. Could that make a difference?
That should not make a difference:
❯ pak::repo_add("MRAN@2022-12-05")
❯ pak::pkg_install("daff")
✔ Loading metadata database ... done
→ Will install 1 package.
→ Will download 1 CRAN package (1.74 MB).
+ daff 0.3.5 ⬇ (1.74 MB)
ℹ Getting 1 pkg (1.74 MB)
✖ Failed to download daff 0.3.5 (aarch64-apple-darwin20)
✖ Failed to download 1 package.
Error:
! error in pak subprocess
Caused by error:
! Failed to download daff from `https://cran.microsoft.com/snapshot/2022-12-05/bin/macosx/big-sur-arm64/contrib/4.2/daff_0.3.5.tgz` and `https://mac.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/daff_0.3.5.tgz`.
Type .Last.error to see the more details.
❯ Sys.setenv(PKG_PLATFORMS = "source")
❯ pak::repo_add("MRAN@2022-12-05")
❯ pak::pkg_install("daff")
✔ Updating metadata database ... done
Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* daff: Can't find package called daff.
Type .Last.error to see the more details.
Can you try the nightly devel version? See the README.
I got the same error with the nightly devel build (installed with install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/devel/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
).
Can you show the output of the installation, please? I.e. the output of
install.packages(
"pak",
repos = sprintf(
"https://r-lib.github.io/p/pak/devel/%s/%s/%s",
.Platform$pkgType, R.Version()$os, R.Version()$arch
)
)
> install.packages(
+ "pak",
+ repos = sprintf(
+ "https://r-lib.github.io/p/pak/devel/%s/%s/%s",
+ .Platform$pkgType, R.Version()$os, R.Version()$arch
+ )
+ )
Installing package into ‘C:/Users/wdenn/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://r-lib.github.io/p/pak/devel/win.binary/mingw32/x86_64/bin/windows/contrib/4.2/../../../../../../../mingw32/x86_64/pak_0.3.1.9000_R-4-2_x86_64-mingw32.zip'
Content type 'application/zip' length 8111747 bytes (7.7 MB)
downloaded 7.7 MB
The downloaded binary packages are in
C:\Users\wdenn\AppData\Local\Temp\Rtmp8UNEqn\downloaded_packages
>
I still get this:
❯ pak::repo_add("MRAN@2022-12-05")
❯ pak::pkg_install("daff")
✔ Updated metadata database: 3.71 MB in 4 files.
✔ Updating metadata database ... done
Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* daff: Can't find package called daff.
Type .Last.error to see the more details.
which is not bad. Do you still have this issue?
When I just tried to install a long list of packages with
pkg_install()
, I got an error:Reprex below:
Created on 2022-12-05 with reprex v2.0.2