The process cannot access the file because it is being used by another process

E

E01T_null

Hello people,

I get a strange error message every time I try to install haskell. My last attempt was trying to install it with the following command: choco install ghc --pre.

The whole message is the following:


C:\Windows\system32>choco install ghc --pre

Chocolatey v0.10.15

Installing the following packages:

ghc

By installing you accept licenses for the packages.

Progress: Downloading cabal 3.4.0.0-rc3... 100%

Progress: Downloading ghc 9.0.1-alpha1... 100%



cabal v3.4.0.0-rc3 - Possibly broken

cabal package files install completed. Performing other installation steps.

The package cabal wants to run 'chocolateyInstall.ps1'.

Note: If you don't run this script, the installation will fail.

Note: To confirm automatically next time, use '-y' or consider:

choco feature enable -n allowGlobalConfirmation

Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y



Downloading cabal 64 bit

from 'https://mistuke.blob.core.windows.n...nstall-3.4.0.0-rc3-x86_64-unknown-mingw32.zip'

Progress: 100% - Completed download of C:\Users\E01T\AppData\Local\Temp\chocolatey\cabal\3.4.0.0-rc3\cabal-install-3.4.0.0-rc3-x86_64-unknown-mingw32.zip (5.22 MB).

Download of cabal-install-3.4.0.0-rc3-x86_64-unknown-mingw32.zip (5.22 MB) completed.

Hashes match.

Extracting C:\Users\E01T\AppData\Local\Temp\chocolatey\cabal\3.4.0.0-rc3\cabal-install-3.4.0.0-rc3-x86_64-unknown-mingw32.zip to C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.4.0.0...

C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.4.0.0

Updated cabal configuration.

Adding C:\ProgramData\chocolatey\bin\mingw64-pkg.bat and pointing it to powershell command C:\ProgramData\chocolatey\lib\cabal\tools\mingw64-pkg.ps1

Environment Vars (like PATH) have changed. Close/reopen your shell to

see the changes (or in powershell/cmd.exe just type `refreshenv`).

ShimGen has successfully created a shim for cabal.exe

ShimGen has successfully created a shim for cabal.exe

The install of cabal was successful.

Software installed to 'C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.4.0.0'



ghc v9.0.1-alpha1

ghc package files install completed. Performing other installation steps.

The package ghc wants to run 'chocolateyInstall.ps1'.

Note: If you don't run this script, the installation will fail.

Note: To confirm automatically next time, use '-y' or consider:

choco feature enable -n allowGlobalConfirmation

Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y



File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded.

Error - hashes do not match. Actual value was '34E683AC3672E465298147DE344E0C81BB817F091BABABE6C369067E5E4B7991'.

Downloading ghc 64 bit

from 'https://downloads.haskell.org/~ghc/9.0.1-alpha1/ghc-9.0.0.20200925-x86_64-unknown-mingw32.tar.xz'

Progress: 98% - Saving 135.81 MB of 137.29 MB Chocolatey timed out waiting for the command to finish. The timeout

specified (or the default value) was '2700' seconds. Perhaps try a

higher `--execution-timeout`? See `choco -h` for details.

Error computing hash for 'C:\ProgramData\chocolatey\lib\ghc\tmp\ghcInstall'

Hash will be special code for locked file or file too big instead.

Captured error:

The process cannot access the file 'C:\ProgramData\chocolatey\lib\ghc\tmp\ghcInstall' because it is being used by another process.

The install of ghc was NOT successful.

Error while running 'C:\ProgramData\chocolatey\lib\ghc\tools\chocolateyInstall.ps1'.

See log for details.

This is try 1/3. Retrying after 300 milliseconds.

Error converted to warning:

(5) Access is denied: [\\?\C:\ProgramData\chocolatey\lib-bad\ghc]

This is try 2/3. Retrying after 400 milliseconds.

Error converted to warning:

(5) Access is denied: [\\?\C:\ProgramData\chocolatey\lib-bad\ghc]

Maximum tries of 3 reached. Throwing error.

This is try 1/3. Retrying after 300 milliseconds.

Error converted to warning:

(32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\lib-bad\ghc\tmp\ghcInstall]

This is try 2/3. Retrying after 400 milliseconds.

Error converted to warning:

(32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\lib-bad\ghc\tmp\ghcInstall]

Maximum tries of 3 reached. Throwing error.

Could not move bad package to failure directory It will show as installed.

C:\ProgramData\chocolatey\lib\ghc

The error:

(32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\lib-bad\ghc\tmp\ghcInstall]

Progress: 99% - Saving 135.96 MB of 137.29 MB

Chocolatey installed 1/2 packages. 1 packages failed.

See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

- ghc (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\ghc\tools\chocolateyInstall.ps1'.

See log for details.


So if I understand correctly the failure is that: The process cannot access the file because it is being used by another process. I am not sure what I am doing wrong. The same applies when I try to install haskell through the "choco install haskell-dev" command. Which process is blocking the installation if any?


Thank you in advance

Continue reading...
 
Back
Top Bottom