0

I am learning the dpkg's usage. So, I am trying to install the wps-office package as example.

sudo dpkg -i wps-office_10.1.05672~a21.deb

which returns an error: Can not access the archive: No such file or folder What's wrong did I do?

Dodi lila
  • 11
  • 1
  • 1
  • 6
  • A classic one, you are forgetting the path to the file. Simply type `sudo dpkg -i ` then drag the file on to the terminal window. Should be a dupe of a few others. – Jacob Vlijm Jan 18 '17 at 19:22
  • 1
    Possible duplicate of [“cannot access archive: No such file or directory” when installing a package using dpkg](https://askubuntu.com/questions/231667/cannot-access-archive-no-such-file-or-directory-when-installing-a-package-usi) or [How can i install .deb files from terminal , i tried different ways in askubuntu](https://askubuntu.com/questions/477111/how-can-i-install-deb-files-from-terminal-i-tried-different-ways-in-askubuntu) -- see also [How do I install a .deb file via the command line?](https://askubuntu.com/questions/40779/how-do-i-install-a-deb-file-via-the-command-line) – Eliah Kagan Jan 18 '17 at 19:33

1 Answers1

0

You must specify the absolute or relative path to the file. If you are running it from a terminal, and you are located in the file path, just run:

sudo dpkg -i ./wps-office_10.1.05672~a21.deb Note the ./

Otherwise, you could use:

sudo dpkg -i <path_to_file>/wps-office_10.1.05672~a21.deb where <path_to_file> could be something like /home/$USER/Documents

or

sudo dpkg -i ../../wps-office_10.1.05672~a21.deb if you are in a subfolder down two levels of the file folder.

GTRONICK
  • 4,302
  • 1
  • 15
  • 23