Download Now
Forums
    General

    Cannot install getlazarus using the script

    Started by zoltanleo on 22 October 2026

    zoltanleo22 October 2026, 10:27

    When I try to install the patched FPC and Lazarus using the installation script in PowerShell:

    irm https://www.getlazarus.org/install-win.ps1 | iex

    I get the following error:

    PS C:\Users\leyba> irm https://www.getlazarus.org/install-win.ps1 | iex
    This script will install the Free Pascal compiler (FPC), the Lazarus IDE and
    the Codebot library on your Windows computer.
    
    Do you want to install FPC and Lazarus? [Y/n]: y
    Include OpenGL rendering support? [Y/n]: y
    Include the web browser control? [Y/n]: y
    Install the demo projects? [Y/n]: y
    
    Install FPC and Lazarus into this folder:
    > d:\portable\lazarus\get_laz
    
    FPC and Lazarus will be downloaded into d:\portable\lazarus\get_laz
    
    Downloading fpc-win.x86_64.zip
      [##############################] 100%  78,6 MB of 78,6 MB
    Downloading lazarus-win.x86_64.zip
      [##############################] 100%  63,6 MB of 63,6 MB
    Downloading dlls-win.x86_64.zip
      [##############################] 100%  51,3 MB of 51,3 MB
    Extracting fpc-win.x86_64.zip
    Extracting lazarus-win.x86_64.zip
    Setting the paths for d:\portable\lazarus\get_laz
    Installing the DLLs into C:\Users\leyba\AppData\Local\bin
    
    Downloading the Codebot library (commit 0979620)
      15,5 MB
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/shared/libs/x86_64-darwin/libSDL2.dylib: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\shared\\libs\\x86_64-darwin\\libSDL2.dylib': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/shared/libs/x86_64-darwin/libSDL2_image.dylib: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\shared\\libs\\x86_64-darwin\\libSDL2_image.dylib': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/shared/libs/x86_64-darwin/libassimp.5.dylib: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\shared\\libs\\x86_64-darwin\\libassimp.5.dylib': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/shared/libs/x86_64-darwin/libassimp.dylib: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\shared\\libs\\x86_64-darwin\\libassimp.dylib': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_controls/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_controls\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_controls_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_controls_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_explorer/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_explorer\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_frame_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_frame_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_render/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_render\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_render_controls/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_render_controls\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_render_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_render_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_render_sdl/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_render_sdl\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_render_sdl_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_render_sdl_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_terminal/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_terminal\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_terminal_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_terminal_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_themes/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_themes\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_themes_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_themes_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_webkit/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_webkit\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_webkit_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_webkit_design\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_windows_shell/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_windows_shell\\README.md': Invalid argument
    Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179/source/codebot_windows_shell_design/README.md: Can't create '\\\\?\\d:\\portable\\lazarus\\get_laz\\install.tmp\\codebot\\Codebot.Cross-097962077898b0ab87ad2a45abaeb399a4b50179\\source\\codebot_windows_shell_design\\README.md': Invalid argument
    tar.exe: Error exit delayed from previous errors
    
    Could not extract codebot.zip
    
    Installation failed. Removing the partly installed files...
    PS C:\Users\leyba>

    I am using Windows 10 x64 Pro 22H2 (build 19045.7807).

    zoltanleo22 October 2026, 10:57

    If I install to the path suggested by default, I get the following:

    Install FPC and Lazarus into this folder:
    > C:\Users\leyba\Development\Pascal
    
    FPC and Lazarus will be downloaded into C:\Users\leyba\Development\Pascal
    
    Downloading fpc-win.x86_64.zip
      [##############################] 100%  78,6 MB of 78,6 MB
    Downloading lazarus-win.x86_64.zip
      [##############################] 100%  63,6 MB of 63,6 MB
    Downloading dlls-win.x86_64.zip
      [##############################] 100%  51,3 MB of 51,3 MB
    Extracting fpc-win.x86_64.zip
    Extracting lazarus-win.x86_64.zip
    Setting the paths for C:\Users\leyba\Development\Pascal
    Installing the DLLs into C:\Users\leyba\AppData\Local\bin
    
    Downloading the Codebot library (commit 0979620)
      15,5 MB
    
    Downloading the user controls package
      [##############################] 100%  0,0 MB of 0,0 MB
    
    Installing the Material Design Icons font
    
    Downloading the demo projects (commit 1725648)
      118,5 MB
    
    These files are missing, Microsoft Defender may have removed them:
      C:\Users\leyba\AppData\Local\bin\SDL2.dll
      C:\Users\leyba\AppData\Local\bin\libssl-3-x64.dll
      C:\Users\leyba\AppData\Local\bin\libcrypto-3-x64.dll
      C:\Users\leyba\AppData\Local\bin\libassimp-5.dll
    
    Windows blocked a file from running.
    Microsoft Defender reported it as a threat. This is a false positive, which
    is common for programs made with Free Pascal. To allow it:
      1. Open Windows Security, then Virus & threat protection
      2. Open Protection history and select the blocked item
      3. Choose Actions, then Allow on device or Restore
      4. Run this installer again
    
    Some files are missing.
    
    Installation failed. Removing the partly installed files...
    PS C:\Windows\system32>

    What steps should I take to resolve this?

    zoltanleo22 October 2026, 11:09

    Adding the ...\AppData\bin\ folder to the antivirus exclusions, or temporarily disabling Defender, doesn’t resolve the issue. Could I suggest modifying the installer script so that users can also choose the DLL extraction path?

    sysrpl22 October 2026, 19:19

    Try running the script again. I made some adjustment for the way Windows 10 works with regards to extracting archives. Please let me know if this fixes it.

    irm https://www.getlazarus.org/install-win.ps1 | iex

    PaulS23 October 2026, 09:52Edited by a moderator

    Paul, so is it working?

    Regarding the dll placements. Some of the functions require external libraries for cross platform sounds, gamepad input, mesh loading, an video playback. On windows these files must be in your path for compilation and running. The way this is handled is by making user you user local path, rather than dumping those files in C:\Windows. Putting them in a just a normal folder is not enough, so local\bin is a compromise.

    On Linux these libraries are handled by the distribution package manager. Windows does not have that sort of thing for dlls.

    PaulS24 October 2026, 06:12

    So far, yes - I did manage to install mormot and compile&run its test suite but that was all I had time for before I had to switch back to "real life".
    I didn't have time to delete everything and start the installation over again "from scratch"

    I did realise the problem with multiple versions/applications/... and Windows requiring stuff on the path - almost immediately after i clicked "Post".
    <grumpy-old-man-mode: ON>
    I just dislike not having - the illusion of - control over where things are placed on my computer
    </gomm>

    PaulS24 October 2026, 12:02

    Update after deleting everything and starting afresh...

    Just like before, installation fails initially but leaves dlls in c:\users\<username>\appdata\local\bin\dlls
    Copy all dlls up one level (to "bin") and can then build & run both lazarus and mormot2

    Compiler still reports an error building Codebot.CpuGraph

    • line 531 'Identifier not found "TProcessorMontiorImpl"' (sic)
    • which seems only to be declared in {$ifdef linux} or {$ifdef darwin} sections

    HTH

    zoltanleo25 October 2026, 16:13

    I made some adjustment for the way Windows 10 works with regards to extracting archives. Please let me know if this fixes it.

    Hi, Anthony,

    Thank you for the fix! This time, I was able to successfully (well, almost) install and run FPC/Lazarus.
    Some of the demos failed to compile with the following error:

    Copies of the shortcuts are in d:\portable\lazarus\get_laz
    
    Do you want to build the demo projects? [Y/n]: y
    
    Building cardsdemo
    Building chasedemo
    Building cpugraph
      cpugraph could not be built
    Building filesearch
    Building ftpview
    Building makedeb
    Building matview
    Building webbrowse
    Building cubedemo
    Building drawdemo
    Building easingsdemo
    Building jointdemo
    Building machinedemo
    Building megademo
    Building physicsdemo
    Building svgdemo
    Building widgetdemo
    
    Some demo projects could not be built: cpugraph
    The build messages are in C:\Users\leyba\AppData\Local\Temp\tmp

    I have a few thoughts on how standard dialogs are displayed, but it would probably be better to discuss them in a separate thread.

    Thank you for your excellent work! I hope you'll continue developing your wonderful plugin.

    ScrSh_783

    ScrSh_786