pdftk snap in 18.04 not accepting commands
following the simple instructions in this answer: https://askubuntu.com/a/1048975 I installed pdftk as a snap on an ubuntu 18.04 VM. (we need some of the advanced features of pdftk on the command line like fill_forms ).
my problem: the command seems to be only half installed:
/some/path # pdftk
-> Usage:
pdftk <command>
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
This is the CLI for snapd, a background service that takes care of
snaps on the system. Start with 'snap list' to see installed snaps.
Available commands:
< long list of snap commands >
so it seems to me as if 'pdftk' is registered as a tool in the bash, but if I try to use any of the usual pdftk commands, I get an error message like this:
pdftk forms/Form_FM.pdf fill_form /tmp/adsh/2017-4_1532602497.fdf output /some/path/2017-4_KF.pdf
-> error: unknown command forms/Form_FM.pdf, see 'snap help'
(this also happens with every other command I tried)
so, how do I pass the commands and parameter to pdftk without snap trying to grab the parameter for itself?
edit: some diagnostics:
ls -l /usr/local/bin/pdftk
lrwxrwxrwx 1 root root 28 Jul 11 18:17 /usr/local/bin/pdftk -> /snap/bin/pdftk-smoser.pdftk
snap list pdftk
error: no matching snaps installed
snap list pdftk-smoser
Name Version Rev Tracking Developer Notes
pdftk-smoser 2.02-4 18 stable smoser -
hmmm...seems like I followed the older version of the answer, which had an additional step that symlinked /snap/bin/pdftk-smoser.pdftk to /usr/local/bin/pdftk
command-line snap pdftk
|
show 3 more comments
following the simple instructions in this answer: https://askubuntu.com/a/1048975 I installed pdftk as a snap on an ubuntu 18.04 VM. (we need some of the advanced features of pdftk on the command line like fill_forms ).
my problem: the command seems to be only half installed:
/some/path # pdftk
-> Usage:
pdftk <command>
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
This is the CLI for snapd, a background service that takes care of
snaps on the system. Start with 'snap list' to see installed snaps.
Available commands:
< long list of snap commands >
so it seems to me as if 'pdftk' is registered as a tool in the bash, but if I try to use any of the usual pdftk commands, I get an error message like this:
pdftk forms/Form_FM.pdf fill_form /tmp/adsh/2017-4_1532602497.fdf output /some/path/2017-4_KF.pdf
-> error: unknown command forms/Form_FM.pdf, see 'snap help'
(this also happens with every other command I tried)
so, how do I pass the commands and parameter to pdftk without snap trying to grab the parameter for itself?
edit: some diagnostics:
ls -l /usr/local/bin/pdftk
lrwxrwxrwx 1 root root 28 Jul 11 18:17 /usr/local/bin/pdftk -> /snap/bin/pdftk-smoser.pdftk
snap list pdftk
error: no matching snaps installed
snap list pdftk-smoser
Name Version Rev Tracking Developer Notes
pdftk-smoser 2.02-4 18 stable smoser -
hmmm...seems like I followed the older version of the answer, which had an additional step that symlinked /snap/bin/pdftk-smoser.pdftk to /usr/local/bin/pdftk
command-line snap pdftk
Hi cypherabe! Welcome to askUbuntu! The third argument of your command is /tmp/adsh/2017-4_1532602497.fdf, but it should be /tmp/adsh/2017-4_1532602497.pdf (misspelled pdf)
– abu_bua
Jul 26 '18 at 11:46
2
Hmm... it actually looks like you're getting the usage information for thesnap
command (but with the command namepdftk
), rather than that of thepdftk
command itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link?
– steeldriver
Jul 26 '18 at 12:02
... can you add the output oftype -a pdftk
please?
– steeldriver
Jul 26 '18 at 12:13
@steeldriver type -a pdftk ->pdftk is /usr/local/bin/pdftk
yes, I am wondering too. first time I use a snap, the examples seemed just so simple...
– cypherabe
Jul 26 '18 at 13:18
1
I don't know why that wouldn't work, however it's a more complicated than it needs to be - the snap is now available as plainpdftk
and/snap/bin
has been part of the default UbuntuPATH
for some time now - I suggest you remove both the symlink and thepdftk-smoser
snap andsnap install pdftk
instead
– steeldriver
Jul 26 '18 at 14:48
|
show 3 more comments
following the simple instructions in this answer: https://askubuntu.com/a/1048975 I installed pdftk as a snap on an ubuntu 18.04 VM. (we need some of the advanced features of pdftk on the command line like fill_forms ).
my problem: the command seems to be only half installed:
/some/path # pdftk
-> Usage:
pdftk <command>
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
This is the CLI for snapd, a background service that takes care of
snaps on the system. Start with 'snap list' to see installed snaps.
Available commands:
< long list of snap commands >
so it seems to me as if 'pdftk' is registered as a tool in the bash, but if I try to use any of the usual pdftk commands, I get an error message like this:
pdftk forms/Form_FM.pdf fill_form /tmp/adsh/2017-4_1532602497.fdf output /some/path/2017-4_KF.pdf
-> error: unknown command forms/Form_FM.pdf, see 'snap help'
(this also happens with every other command I tried)
so, how do I pass the commands and parameter to pdftk without snap trying to grab the parameter for itself?
edit: some diagnostics:
ls -l /usr/local/bin/pdftk
lrwxrwxrwx 1 root root 28 Jul 11 18:17 /usr/local/bin/pdftk -> /snap/bin/pdftk-smoser.pdftk
snap list pdftk
error: no matching snaps installed
snap list pdftk-smoser
Name Version Rev Tracking Developer Notes
pdftk-smoser 2.02-4 18 stable smoser -
hmmm...seems like I followed the older version of the answer, which had an additional step that symlinked /snap/bin/pdftk-smoser.pdftk to /usr/local/bin/pdftk
command-line snap pdftk
following the simple instructions in this answer: https://askubuntu.com/a/1048975 I installed pdftk as a snap on an ubuntu 18.04 VM. (we need some of the advanced features of pdftk on the command line like fill_forms ).
my problem: the command seems to be only half installed:
/some/path # pdftk
-> Usage:
pdftk <command>
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
This is the CLI for snapd, a background service that takes care of
snaps on the system. Start with 'snap list' to see installed snaps.
Available commands:
< long list of snap commands >
so it seems to me as if 'pdftk' is registered as a tool in the bash, but if I try to use any of the usual pdftk commands, I get an error message like this:
pdftk forms/Form_FM.pdf fill_form /tmp/adsh/2017-4_1532602497.fdf output /some/path/2017-4_KF.pdf
-> error: unknown command forms/Form_FM.pdf, see 'snap help'
(this also happens with every other command I tried)
so, how do I pass the commands and parameter to pdftk without snap trying to grab the parameter for itself?
edit: some diagnostics:
ls -l /usr/local/bin/pdftk
lrwxrwxrwx 1 root root 28 Jul 11 18:17 /usr/local/bin/pdftk -> /snap/bin/pdftk-smoser.pdftk
snap list pdftk
error: no matching snaps installed
snap list pdftk-smoser
Name Version Rev Tracking Developer Notes
pdftk-smoser 2.02-4 18 stable smoser -
hmmm...seems like I followed the older version of the answer, which had an additional step that symlinked /snap/bin/pdftk-smoser.pdftk to /usr/local/bin/pdftk
command-line snap pdftk
command-line snap pdftk
edited Jul 26 '18 at 13:50
cypherabe
asked Jul 26 '18 at 11:27
cypherabecypherabe
1165
1165
Hi cypherabe! Welcome to askUbuntu! The third argument of your command is /tmp/adsh/2017-4_1532602497.fdf, but it should be /tmp/adsh/2017-4_1532602497.pdf (misspelled pdf)
– abu_bua
Jul 26 '18 at 11:46
2
Hmm... it actually looks like you're getting the usage information for thesnap
command (but with the command namepdftk
), rather than that of thepdftk
command itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link?
– steeldriver
Jul 26 '18 at 12:02
... can you add the output oftype -a pdftk
please?
– steeldriver
Jul 26 '18 at 12:13
@steeldriver type -a pdftk ->pdftk is /usr/local/bin/pdftk
yes, I am wondering too. first time I use a snap, the examples seemed just so simple...
– cypherabe
Jul 26 '18 at 13:18
1
I don't know why that wouldn't work, however it's a more complicated than it needs to be - the snap is now available as plainpdftk
and/snap/bin
has been part of the default UbuntuPATH
for some time now - I suggest you remove both the symlink and thepdftk-smoser
snap andsnap install pdftk
instead
– steeldriver
Jul 26 '18 at 14:48
|
show 3 more comments
Hi cypherabe! Welcome to askUbuntu! The third argument of your command is /tmp/adsh/2017-4_1532602497.fdf, but it should be /tmp/adsh/2017-4_1532602497.pdf (misspelled pdf)
– abu_bua
Jul 26 '18 at 11:46
2
Hmm... it actually looks like you're getting the usage information for thesnap
command (but with the command namepdftk
), rather than that of thepdftk
command itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link?
– steeldriver
Jul 26 '18 at 12:02
... can you add the output oftype -a pdftk
please?
– steeldriver
Jul 26 '18 at 12:13
@steeldriver type -a pdftk ->pdftk is /usr/local/bin/pdftk
yes, I am wondering too. first time I use a snap, the examples seemed just so simple...
– cypherabe
Jul 26 '18 at 13:18
1
I don't know why that wouldn't work, however it's a more complicated than it needs to be - the snap is now available as plainpdftk
and/snap/bin
has been part of the default UbuntuPATH
for some time now - I suggest you remove both the symlink and thepdftk-smoser
snap andsnap install pdftk
instead
– steeldriver
Jul 26 '18 at 14:48
Hi cypherabe! Welcome to askUbuntu! The third argument of your command is /tmp/adsh/2017-4_1532602497.fdf, but it should be /tmp/adsh/2017-4_1532602497.pdf (misspelled pdf)
– abu_bua
Jul 26 '18 at 11:46
Hi cypherabe! Welcome to askUbuntu! The third argument of your command is /tmp/adsh/2017-4_1532602497.fdf, but it should be /tmp/adsh/2017-4_1532602497.pdf (misspelled pdf)
– abu_bua
Jul 26 '18 at 11:46
2
2
Hmm... it actually looks like you're getting the usage information for the
snap
command (but with the command name pdftk
), rather than that of the pdftk
command itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link?– steeldriver
Jul 26 '18 at 12:02
Hmm... it actually looks like you're getting the usage information for the
snap
command (but with the command name pdftk
), rather than that of the pdftk
command itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link?– steeldriver
Jul 26 '18 at 12:02
... can you add the output of
type -a pdftk
please?– steeldriver
Jul 26 '18 at 12:13
... can you add the output of
type -a pdftk
please?– steeldriver
Jul 26 '18 at 12:13
@steeldriver type -a pdftk ->
pdftk is /usr/local/bin/pdftk
yes, I am wondering too. first time I use a snap, the examples seemed just so simple...– cypherabe
Jul 26 '18 at 13:18
@steeldriver type -a pdftk ->
pdftk is /usr/local/bin/pdftk
yes, I am wondering too. first time I use a snap, the examples seemed just so simple...– cypherabe
Jul 26 '18 at 13:18
1
1
I don't know why that wouldn't work, however it's a more complicated than it needs to be - the snap is now available as plain
pdftk
and /snap/bin
has been part of the default Ubuntu PATH
for some time now - I suggest you remove both the symlink and the pdftk-smoser
snap and snap install pdftk
instead– steeldriver
Jul 26 '18 at 14:48
I don't know why that wouldn't work, however it's a more complicated than it needs to be - the snap is now available as plain
pdftk
and /snap/bin
has been part of the default Ubuntu PATH
for some time now - I suggest you remove both the symlink and the pdftk-smoser
snap and snap install pdftk
instead– steeldriver
Jul 26 '18 at 14:48
|
show 3 more comments
2 Answers
2
active
oldest
votes
As steeldriver suggested, I ended up with removing the symlink, removing the pdftk-smoser snap, then installing the pdftk snap and finally creating a new symlink for /usr/local/bin/pdftk to /snap/bin/pdftk
now a call to pdftk
on the commandline brings up the pdftk usage hint, not something snap related
a caveat: I still can't access my pdf files, but at least I get pdftk error messages now. I'm not sure if it is a snap problem, an apparmor problem or a general rights problem...but if I can't find a solution that will be a new question
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
1
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
add a comment |
https://wilransz.com/pdftk-on-ubuntu-18-04/
sudo ln -s /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftk
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1059664%2fpdftk-snap-in-18-04-not-accepting-commands%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
As steeldriver suggested, I ended up with removing the symlink, removing the pdftk-smoser snap, then installing the pdftk snap and finally creating a new symlink for /usr/local/bin/pdftk to /snap/bin/pdftk
now a call to pdftk
on the commandline brings up the pdftk usage hint, not something snap related
a caveat: I still can't access my pdf files, but at least I get pdftk error messages now. I'm not sure if it is a snap problem, an apparmor problem or a general rights problem...but if I can't find a solution that will be a new question
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
1
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
add a comment |
As steeldriver suggested, I ended up with removing the symlink, removing the pdftk-smoser snap, then installing the pdftk snap and finally creating a new symlink for /usr/local/bin/pdftk to /snap/bin/pdftk
now a call to pdftk
on the commandline brings up the pdftk usage hint, not something snap related
a caveat: I still can't access my pdf files, but at least I get pdftk error messages now. I'm not sure if it is a snap problem, an apparmor problem or a general rights problem...but if I can't find a solution that will be a new question
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
1
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
add a comment |
As steeldriver suggested, I ended up with removing the symlink, removing the pdftk-smoser snap, then installing the pdftk snap and finally creating a new symlink for /usr/local/bin/pdftk to /snap/bin/pdftk
now a call to pdftk
on the commandline brings up the pdftk usage hint, not something snap related
a caveat: I still can't access my pdf files, but at least I get pdftk error messages now. I'm not sure if it is a snap problem, an apparmor problem or a general rights problem...but if I can't find a solution that will be a new question
As steeldriver suggested, I ended up with removing the symlink, removing the pdftk-smoser snap, then installing the pdftk snap and finally creating a new symlink for /usr/local/bin/pdftk to /snap/bin/pdftk
now a call to pdftk
on the commandline brings up the pdftk usage hint, not something snap related
a caveat: I still can't access my pdf files, but at least I get pdftk error messages now. I'm not sure if it is a snap problem, an apparmor problem or a general rights problem...but if I can't find a solution that will be a new question
answered Jul 26 '18 at 15:15
cypherabecypherabe
1165
1165
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
1
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
add a comment |
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
1
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
You could also try a fork based of pdftk depending on OpenJDK as described here: askubuntu.com/questions/1028522/… . This worked flawlessly for me.
– Bruni
Jul 26 '18 at 15:20
1
1
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
As described in github.com/smoser/pdftk/issues/1 , snap cannot access files in /tmp. The easiest workaround is to copy the files to your home directory and use them from there.
– smoser
Sep 5 '18 at 13:15
add a comment |
https://wilransz.com/pdftk-on-ubuntu-18-04/
sudo ln -s /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftk
New contributor
add a comment |
https://wilransz.com/pdftk-on-ubuntu-18-04/
sudo ln -s /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftk
New contributor
add a comment |
https://wilransz.com/pdftk-on-ubuntu-18-04/
sudo ln -s /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftk
New contributor
https://wilransz.com/pdftk-on-ubuntu-18-04/
sudo ln -s /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftk
New contributor
New contributor
answered 19 mins ago
GuestGuest
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1059664%2fpdftk-snap-in-18-04-not-accepting-commands%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi cypherabe! Welcome to askUbuntu! The third argument of your command is /tmp/adsh/2017-4_1532602497.fdf, but it should be /tmp/adsh/2017-4_1532602497.pdf (misspelled pdf)
– abu_bua
Jul 26 '18 at 11:46
2
Hmm... it actually looks like you're getting the usage information for the
snap
command (but with the command namepdftk
), rather than that of thepdftk
command itself - I wonder what could have gone wrong? Did you by any chance make a symbolic link?– steeldriver
Jul 26 '18 at 12:02
... can you add the output of
type -a pdftk
please?– steeldriver
Jul 26 '18 at 12:13
@steeldriver type -a pdftk ->
pdftk is /usr/local/bin/pdftk
yes, I am wondering too. first time I use a snap, the examples seemed just so simple...– cypherabe
Jul 26 '18 at 13:18
1
I don't know why that wouldn't work, however it's a more complicated than it needs to be - the snap is now available as plain
pdftk
and/snap/bin
has been part of the default UbuntuPATH
for some time now - I suggest you remove both the symlink and thepdftk-smoser
snap andsnap install pdftk
instead– steeldriver
Jul 26 '18 at 14:48