Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Libreoffice can't find Java on ubuntu server

I'm trying to run the following command using Symfony inside of a controller that I have (laravel):

"soffice --safe-mode --convert-to pdf store/file.docx --headless

It works in commandline but not when run through the controller. I thought it might be a permissions issue at first but now I keep getting this error about java:

Exit Code: 77(Unknown error)↵↵Working directory: /var/www/project/public↵↵Output:↵================↵↵↵Error Output:↵================↵javaldx failed!↵Warning: failed to read path from javaldx↵LibreOffice 6.2 - Fatal Error: The application cannot be started. ↵User installation could not be completed. ↵" trace: [{function: "getHigherPDF", class: "App\Http\Controllers\AssessmentController", type: "::"},…]

so I'm thinking that it can't find java for some reason? Where can I update the path to my correct instance of java if that's the issue?

Libreoffice can't find Java on ubuntu server

I'm trying to run the following command using Symfony inside of a controller that I have (laravel):

"soffice --safe-mode --convert-to pdf store/file.docx --headless

It works in commandline but not when run through the controller. I thought it might be a permissions issue at first but now I keep getting this error about java:

Exit Code: 77(Unknown error)↵↵Working directory: /var/www/project/public↵↵Output:↵================↵↵↵Error Output:↵================↵javaldx failed!↵Warning: failed to read path from javaldx↵LibreOffice 6.2 - Fatal Error: The application cannot be started. ↵User installation could not be completed. ↵" trace: [{function: "getHigherPDF", class: "App\Http\Controllers\AssessmentController", type: "::"},…]

so I'm thinking that it can't find java for some reason? Where can I update the path to my correct instance of java if that's the issue?

When i do which libreoffice it says i'm using /usr/bin/libreoffice, but when i try to find a place to updat the java path in there I'm afraid to edit because it's not super clear where the path is defined

Libreoffice can't find Java on ubuntu server

I'm trying to run the following command using Symfony inside of a controller that I have (laravel):

"soffice --safe-mode --convert-to pdf store/file.docx --headless

It works in commandline but not when run through the controller. I thought it might be a permissions issue at first but now I keep getting this error about java:

Exit Code: 77(Unknown error)↵↵Working directory: /var/www/project/public↵↵Output:↵================↵↵↵Error Output:↵================↵javaldx failed!↵Warning: failed to read path from javaldx↵LibreOffice 6.2 - Fatal Error: The application cannot be started. ↵User installation could not be completed. ↵" trace: [{function: "getHigherPDF", class: "App\Http\Controllers\AssessmentController", type: "::"},…]

so I'm thinking that it can't find java for some reason? Where can I update the path to my correct instance of java if that's the issue?

When i do which libreoffice it says i'm using /usr/bin/libreoffice, but when i try to find a place to updat the java path in there I'm afraid to edit because it's not super clear where the path is defined

edit: i've tried installing libreoffice-base and it didn't help