Help - Trying to install Libre office on server but unfamiliar with docker
I am building a feature to extract text from .ppt files in my application. I am using libreoffice-convert to do this, however, I need the actual libre office application installed on the server for it to work. Is it possible to ssh into the server and do a sudo apt install?
19 Replies
Project ID:
bc8937d0-8a92-41f5-b8d9-e0f76d660929
bc8937d0-8a92-41f5-b8d9-e0f76d660929
So I can just add this nixpacks.toml file to the root directory and that does it?
yep!
Thanks Brody, I would try this out and give feedback
#15 [stage-0 11/15] RUN --mount=type=cache,id=s/f8624550-8b68-46f9-8631-b118ef743732-/root/npm,target=/root/.npm npm ci
#15 0.243 /bin/bash: line 1: npm: command not found
#15 ERROR: process "/bin/bash -ol pipefail -c npm ci" did not complete successfully: exit code: 127
-----
[stage-0 11/15] RUN --mount=type=cache,id=s/f8624550-8b68-46f9-8631-b118ef743732-/root/npm,target=/root/.npm npm ci:0.243 /bin/bash: line 1: npm: command not found ----- Dockerfile:26 ------------------- 24 | ENV NIXPACKS_PATH=/app/node_modules/.bin:$NIXPACKS_PATH 25 | COPY . /app/. 26 | >>> RUN --mount=type=cache,id=s/f8624550-8b68-46f9-8631-b118ef743732-/root/npm,target=/root/.npm npm ci 27 | 28 | # build phase ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm ci" did not complete successfully: exit code: 127 Error: Docker build failed the build fails for some reason nixpacks.toml [phases.setup] nixPkgs = ['libreoffice']
please enclose that in tripple backticks
tripple backticks please
are you aware you can edit messages in discord?
not very familiar with discord haha. only used it to reach out to you guys
you are missing the
...
oh so it needs to be like this
yep
alright, ill give it another go. thanks Brody
So after trying this, the application build. For some reason, I still get an error when trying to use the package which says: Could not find soffice binary
I'm not sure why this happens, I also tried specifying the path like so:
But to no avail. Any ideas?
Please, I need a response
@Brody @Adam Please, I need help with this. It is pretty urgent
I’m sorry, but it is the weekend. This channel is primarily for community help, if someone has time they will help, but there is no guarantee
Might be best to write yourself up a Dockerfile instead of relying on nix packages
New reply sent from Help Station thread:
the same problemYou're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Maybe you need to use convertWithOptions when using libreoffice-convert. In convertWithOptions, you can specify the path of the binary file. But there is a problem. After I installed libreoffice, I can't find the specific path. I haven't found a way to enter the container and execute which libreoffice.You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
finally done!1. [phases.setup]
nixPkgs = ['...', 'libreoffice']2.import { execSync } from 'child_process';
const sofficeLocation = execSync('which soffice').toString().trim();
console.log(sofficeLocation: ${sofficeLocation}
);
const convert = util.promisify(convertAsync.convertWithOptions);
const options = {
sofficeBinaryPaths: [sofficeLocation],
};
return convert(pptBuffer, 'pdf', undefined, options);
You're seeing this because this thread has been automatically linked to the Help Station thread.