[osgeo4w-dev] [osgeo4w] #804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer

OSGeo4W trac_osgeo4w at osgeo.org
Wed Sep 27 03:36:44 PDT 2023


#804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer
------------------------------------------------+--------------------------
Reporter:  ascottwwf                            |       Owner:  osgeo4w-
                                                |  dev@…
    Type:  defect                               |      Status:  new
Priority:  normal                               |   Component:  Installer
 Version:  1.0                                  |  Resolution:
Keywords:  QGIS LTR OSGeo4W scripted installer  |
------------------------------------------------+--------------------------
Comment (by ascottwwf):

 Sorry for the delay, I have been trying a few different variations but
 unfortunately I have not been able to get version 3.28.11 to successfully
 run after 'appearing' to successfully complete a fresh install in my
 Sandbox, I still get the same error message as before.

 As I was wondering if it was related to the install path having a space in
 it, as a test I modified my install script (Changed '--root' (destination
 path) from "C:\Program Files\OSGeo4W_v2" to "C:\ProgramData\OSGeo4W_v2"

 My full (PowerShell) install script is now:

 {{{
 "Begin: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
 If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
      Try {
          &"$ENV:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe"
 -File $PSCOMMANDPATH
      }
      Catch {
          Throw "Failed to start $PSCOMMANDPATH"
      }
      Exit
 }

 "End: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
 #Requires -RunAsAdministrator

 <#
 =========================================================================================
 Install-OSGeo4W_QGIS-LTR.ps1
 -----------------------------
 .Synopsis
    Download the OSGeo4W installer then download and install QGIS LTR
 (through the 'full' meta-package).
 .DESCRIPTION
    This script will:
       1. change the current directory to the user downloads folder
       2. download the OSGeo4W installer
       3. launch it passing command-line parameters to INSTALL QGIS LTR
     Documentation reference:
 https://trac.osgeo.org/osgeo4w/wiki/CommandLine
 #>

 <#
 =========================================================================================
 WWF-UK version
 --------------
 Adrian Scott
 7th December 2022

 Original file sourced from:
 https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985

 =========================================================================================
 #>

 Write-Host "=== Start installing / upgrading QGIS LTR..." -ForegroundColor
 Green

 # Save current working directory
 $starter_path = Get-Location

 # Move into the user download directory
 Set-Location -Path "$($env:USERPROFILE)\Downloads"

 # Set saved name of File to be downloaded
 $OutFile = "osgeo4w-setup.exe"

 # Download installer
 Write-Host " = Start downloading the OSGeo4W installer..."
 -ForegroundColor Yellow
 Invoke-WebRequest -Uri "https://download.osgeo.org/osgeo4w/v2/osgeo4w-
 setup.exe" -OutFile $OutFile

 # Download and install (same command to upgrade with clean up)
 Write-Host " = Start installing / upgrading QGIS LTR..." -ForegroundColor
 Yellow
 & .\$($OutFile) `
     --quiet-mode `
     --advanced `
     --arch x86_64 `
     --autoaccept `
     --delete-orphans `
     --local-package-dir "$($env:APPDATA)\OSGeo4W_v2-Packages" `
     --menu-name "QGIS LTR" `
     --no-desktop `
     --packages qgis-ltr-full `
     --root "$($env:ProgramData)\OSGeo4W_v2" `
     --site "https://www.norbit.de/osgeo4w/v2" `
     --site "https://download.osgeo.org/osgeo4w/v2" `
     --site "https://ftp.osuosl.org/pub/osgeo/download/osgeo4w/v2" `
     --upgrade-also `
  | out-null

 # Return to the initial directory
 Set-Location -Path $starter_path
 Write-Host "==== Work is done!" -ForegroundColor Green
 }}}

 I will attach the new log files from the Sandbox for further
 investigationSorry for the delay, I have not been able to get version
 3.28.11 to successfully run after completing a fresh install in my
 Sandbox, I get the same error message as before.

 As I was wondering if it was related to the install path having a space in
 it, as a test I modified my install script (Changed '--root' (destination
 path) from "C:\Program Files\OSGeo4W_v2" to "C:\ProgramData\OSGeo4W_v2"

 My full (PowerShell) install script is now:

 {{{
 "Begin: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
 If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
      Try {
          &"$ENV:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe"
 -File $PSCOMMANDPATH
      }
      Catch {
          Throw "Failed to start $PSCOMMANDPATH"
      }
      Exit
 }

 "End: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
 #Requires -RunAsAdministrator

 <#
 =========================================================================================
 Install-OSGeo4W_QGIS-LTR.ps1
 -----------------------------
 .Synopsis
    Download the OSGeo4W installer then download and install QGIS LTR
 (through the 'full' meta-package).
 .DESCRIPTION
    This script will:
       1. change the current directory to the user downloads folder
       2. download the OSGeo4W installer
       3. launch it passing command-line parameters to INSTALL QGIS LTR
     Documentation reference:
 https://trac.osgeo.org/osgeo4w/wiki/CommandLine
 #>

 <#
 =========================================================================================
 WWF-UK version
 --------------
 Adrian Scott
 7th December 2022

 Original file sourced from:
 https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985

 =========================================================================================
 #>

 Write-Host "=== Start installing / upgrading QGIS LTR..." -ForegroundColor
 Green

 # Save current working directory
 $starter_path = Get-Location

 # Move into the user download directory
 Set-Location -Path "$($env:USERPROFILE)\Downloads"

 # Set saved name of File to be downloaded
 $OutFile = "osgeo4w-setup.exe"

 # Download installer
 Write-Host " = Start downloading the OSGeo4W installer..."
 -ForegroundColor Yellow
 Invoke-WebRequest -Uri "https://download.osgeo.org/osgeo4w/v2/osgeo4w-
 setup.exe" -OutFile $OutFile

 # Download and install (same command to upgrade with clean up)
 Write-Host " = Start installing / upgrading QGIS LTR..." -ForegroundColor
 Yellow
 & .\$($OutFile) `
     --quiet-mode `
     --advanced `
     --arch x86_64 `
     --autoaccept `
     --delete-orphans `
     --local-package-dir "$($env:APPDATA)\OSGeo4W_v2-Packages" `
     --menu-name "QGIS LTR" `
     --no-desktop `
     --packages qgis-ltr-full `
     --root "$($env:ProgramData)\OSGeo4W_v2" `
     --site "https://www.norbit.de/osgeo4w/v2" `
     --site "https://download.osgeo.org/osgeo4w/v2" `
     --site "https://ftp.osuosl.org/pub/osgeo/download/osgeo4w/v2" `
     --upgrade-also `
  | out-null

 # Return to the initial directory
 Set-Location -Path $starter_path
 Write-Host "==== Work is done!" -ForegroundColor Green
 }}}

 I therefore can only conclude this _must_ be an installation bug of some
 sort?
 I have attached the new setup.log file from the Sandbox for further
 investigation (I can not attach the setup.log.full as it is too big to
 attach to this case - it is 292Kb when it is zipped)
-- 
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/804#comment:8>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the osgeo4w-dev mailing list