"cannot access archive: No such file or directory" when installing a package using dpkg

I have download the QQ2012's deb in downlaod files, but when I install the deb, system tell me:

$ sudo dpkg -i wineqq2012-20120719-longene.deb
[sudo] password for collins: 
dpkg: error processing wineqq2012-20120719-longene.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 wineqq2012-20120719-longene.deb

The error message No such file or directory means that the .deb file does not exist, or does not exist in the current directory.

The ~ between : and $ in the prompt represents the current working directory. ~ (when the next character is a / or, as in this case, nothing at all) is shorthand for your home directory, /home/collins.

You said you downloaded the .deb file "in download files." Assuming this means you downloaded it to your Downloads folder, that means it's located in /home/collins/Downloads rather than /home/collins.

So you should be able to install it by running this command:

sudo dpkg -i ~/Downloads/wineqq2012-20120719-longene.deb

If that doesn't work, try typing

sudo dpkg -i

without pressing Enter. Add a space to the end. Then drag the file from Nautilus (the file browser) into the Terminal window. That will paste its full path. Then press Enter.


I think you are running the command from a different directory.

Open Terminal (Ctrl+Alt+T) and make sure that the file you trying to run is listed when you do the ls command.

If you have downloaded the file using a web browser browser, then the file should be located in ~/Downloads. Change the directory to your downloads folder with cd ~/Downloads.

Once you have made sure that ls lists the file, then run the command:

sudo dpkg -i wineqq2012-20120719-longene.deb