dpkg seems to be broken: command not found

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












Tested on two 18.04 installs, while trying to install printer drivers and a few other packages. (Also see EDIT below)



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found

sudo /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb: command not found


Testing with:



sudo dpkg --configure -a


Command completes OK, but no messages



This works:



sudo dpkg --help:


But the moment I add any command line options, I get "Command not found".



$PATH=
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin



Edit....
I tried other packages and they worked.
So I re-downloaded the deb from the source.



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found


Then a few seconds later, with no other changes - it worked:



sudo dpkg -i --force-all LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
(Reading database ... 230357 files and directories currently installed.)
Preparing to unpack LPR_mfcj4620dwlpr-3.0.1-1.i386.deb ...
Unpacking mfcj4620dwlpr:i386 (3.0.1-1) over (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.
Setting up mfcj4620dwlpr:i386 (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.


dpkg is not giving me any meaningful output if there is a problem with the actual file



In fact, this is very odd - inconsistent behaviour:



sudo dpkg -i nonexistentfile
dpkg: error: cannot access archive 'nonexistentfile': No such file or directory


But:



sudo dpkg -i nonsensename
sudo: dpkg -i: command not found

sudo dpkg -i thursday
sudo: dpkg -i: command not found


Also interesting, when using filename completion, dkpg will not expand the filename if the test results in a command not found error. But will do so with a valid package. This almost suggests a problem with the shell.







share|improve this question


















  • 1




    Are you copy-pasting this from somewhere?
    – muru
    May 24 at 13:23










  • Originally, yes, but to eliminate that I worked within the shell. So copying/pasting from ls results within exact same shell (to save typing errors). PS I've made an edit in the last few minutes
    – abssorb
    May 24 at 13:26










  • So this happens even if you type out every single character in the command line?
    – muru
    May 24 at 13:32










  • Yes. All the above after "Edit" was typed character by character.
    – abssorb
    May 24 at 14:55










  • wild guess here: are you typing this from an OSX terminal and happen to type alt-space accidentally (which would produce the unicode 0083 or "no break here" character, indistinguishable from space)
    – Sebastian Stark
    May 24 at 17:08














up vote
0
down vote

favorite












Tested on two 18.04 installs, while trying to install printer drivers and a few other packages. (Also see EDIT below)



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found

sudo /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb: command not found


Testing with:



sudo dpkg --configure -a


Command completes OK, but no messages



This works:



sudo dpkg --help:


But the moment I add any command line options, I get "Command not found".



$PATH=
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin



Edit....
I tried other packages and they worked.
So I re-downloaded the deb from the source.



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found


Then a few seconds later, with no other changes - it worked:



sudo dpkg -i --force-all LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
(Reading database ... 230357 files and directories currently installed.)
Preparing to unpack LPR_mfcj4620dwlpr-3.0.1-1.i386.deb ...
Unpacking mfcj4620dwlpr:i386 (3.0.1-1) over (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.
Setting up mfcj4620dwlpr:i386 (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.


dpkg is not giving me any meaningful output if there is a problem with the actual file



In fact, this is very odd - inconsistent behaviour:



sudo dpkg -i nonexistentfile
dpkg: error: cannot access archive 'nonexistentfile': No such file or directory


But:



sudo dpkg -i nonsensename
sudo: dpkg -i: command not found

sudo dpkg -i thursday
sudo: dpkg -i: command not found


Also interesting, when using filename completion, dkpg will not expand the filename if the test results in a command not found error. But will do so with a valid package. This almost suggests a problem with the shell.







share|improve this question


















  • 1




    Are you copy-pasting this from somewhere?
    – muru
    May 24 at 13:23










  • Originally, yes, but to eliminate that I worked within the shell. So copying/pasting from ls results within exact same shell (to save typing errors). PS I've made an edit in the last few minutes
    – abssorb
    May 24 at 13:26










  • So this happens even if you type out every single character in the command line?
    – muru
    May 24 at 13:32










  • Yes. All the above after "Edit" was typed character by character.
    – abssorb
    May 24 at 14:55










  • wild guess here: are you typing this from an OSX terminal and happen to type alt-space accidentally (which would produce the unicode 0083 or "no break here" character, indistinguishable from space)
    – Sebastian Stark
    May 24 at 17:08












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Tested on two 18.04 installs, while trying to install printer drivers and a few other packages. (Also see EDIT below)



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found

sudo /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb: command not found


Testing with:



sudo dpkg --configure -a


Command completes OK, but no messages



This works:



sudo dpkg --help:


But the moment I add any command line options, I get "Command not found".



$PATH=
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin



Edit....
I tried other packages and they worked.
So I re-downloaded the deb from the source.



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found


Then a few seconds later, with no other changes - it worked:



sudo dpkg -i --force-all LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
(Reading database ... 230357 files and directories currently installed.)
Preparing to unpack LPR_mfcj4620dwlpr-3.0.1-1.i386.deb ...
Unpacking mfcj4620dwlpr:i386 (3.0.1-1) over (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.
Setting up mfcj4620dwlpr:i386 (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.


dpkg is not giving me any meaningful output if there is a problem with the actual file



In fact, this is very odd - inconsistent behaviour:



sudo dpkg -i nonexistentfile
dpkg: error: cannot access archive 'nonexistentfile': No such file or directory


But:



sudo dpkg -i nonsensename
sudo: dpkg -i: command not found

sudo dpkg -i thursday
sudo: dpkg -i: command not found


Also interesting, when using filename completion, dkpg will not expand the filename if the test results in a command not found error. But will do so with a valid package. This almost suggests a problem with the shell.







share|improve this question














Tested on two 18.04 installs, while trying to install printer drivers and a few other packages. (Also see EDIT below)



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found

sudo /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: /usr/bin/dpkg -V LPR_mfcj4620dwlpr-3.0.1-1.i386.deb: command not found


Testing with:



sudo dpkg --configure -a


Command completes OK, but no messages



This works:



sudo dpkg --help:


But the moment I add any command line options, I get "Command not found".



$PATH=
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin



Edit....
I tried other packages and they worked.
So I re-downloaded the deb from the source.



sudo dpkg -i --force-all  LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
sudo: dpkg -i --force-all : command not found


Then a few seconds later, with no other changes - it worked:



sudo dpkg -i --force-all LPR_mfcj4620dwlpr-3.0.1-1.i386.deb
(Reading database ... 230357 files and directories currently installed.)
Preparing to unpack LPR_mfcj4620dwlpr-3.0.1-1.i386.deb ...
Unpacking mfcj4620dwlpr:i386 (3.0.1-1) over (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.
Setting up mfcj4620dwlpr:i386 (3.0.1-1) ...
Stopping printer spooler: lpd.
Starting printer spooler: lpd.


dpkg is not giving me any meaningful output if there is a problem with the actual file



In fact, this is very odd - inconsistent behaviour:



sudo dpkg -i nonexistentfile
dpkg: error: cannot access archive 'nonexistentfile': No such file or directory


But:



sudo dpkg -i nonsensename
sudo: dpkg -i: command not found

sudo dpkg -i thursday
sudo: dpkg -i: command not found


Also interesting, when using filename completion, dkpg will not expand the filename if the test results in a command not found error. But will do so with a valid package. This almost suggests a problem with the shell.









share|improve this question













share|improve this question




share|improve this question








edited May 24 at 13:24

























asked May 24 at 12:49









abssorb

134




134







  • 1




    Are you copy-pasting this from somewhere?
    – muru
    May 24 at 13:23










  • Originally, yes, but to eliminate that I worked within the shell. So copying/pasting from ls results within exact same shell (to save typing errors). PS I've made an edit in the last few minutes
    – abssorb
    May 24 at 13:26










  • So this happens even if you type out every single character in the command line?
    – muru
    May 24 at 13:32










  • Yes. All the above after "Edit" was typed character by character.
    – abssorb
    May 24 at 14:55










  • wild guess here: are you typing this from an OSX terminal and happen to type alt-space accidentally (which would produce the unicode 0083 or "no break here" character, indistinguishable from space)
    – Sebastian Stark
    May 24 at 17:08












  • 1




    Are you copy-pasting this from somewhere?
    – muru
    May 24 at 13:23










  • Originally, yes, but to eliminate that I worked within the shell. So copying/pasting from ls results within exact same shell (to save typing errors). PS I've made an edit in the last few minutes
    – abssorb
    May 24 at 13:26










  • So this happens even if you type out every single character in the command line?
    – muru
    May 24 at 13:32










  • Yes. All the above after "Edit" was typed character by character.
    – abssorb
    May 24 at 14:55










  • wild guess here: are you typing this from an OSX terminal and happen to type alt-space accidentally (which would produce the unicode 0083 or "no break here" character, indistinguishable from space)
    – Sebastian Stark
    May 24 at 17:08







1




1




Are you copy-pasting this from somewhere?
– muru
May 24 at 13:23




Are you copy-pasting this from somewhere?
– muru
May 24 at 13:23












Originally, yes, but to eliminate that I worked within the shell. So copying/pasting from ls results within exact same shell (to save typing errors). PS I've made an edit in the last few minutes
– abssorb
May 24 at 13:26




Originally, yes, but to eliminate that I worked within the shell. So copying/pasting from ls results within exact same shell (to save typing errors). PS I've made an edit in the last few minutes
– abssorb
May 24 at 13:26












So this happens even if you type out every single character in the command line?
– muru
May 24 at 13:32




So this happens even if you type out every single character in the command line?
– muru
May 24 at 13:32












Yes. All the above after "Edit" was typed character by character.
– abssorb
May 24 at 14:55




Yes. All the above after "Edit" was typed character by character.
– abssorb
May 24 at 14:55












wild guess here: are you typing this from an OSX terminal and happen to type alt-space accidentally (which would produce the unicode 0083 or "no break here" character, indistinguishable from space)
– Sebastian Stark
May 24 at 17:08




wild guess here: are you typing this from an OSX terminal and happen to type alt-space accidentally (which would produce the unicode 0083 or "no break here" character, indistinguishable from space)
– Sebastian Stark
May 24 at 17:08















active

oldest

votes











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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039827%2fdpkg-seems-to-be-broken-command-not-found%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039827%2fdpkg-seems-to-be-broken-command-not-found%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491