Syntax error near unexpected token 'newline' error while installing .deb packages offline
Solution 1
Try installing the software with
dpkg --install <Package_Name>
Like in your case just cd
into the directory and then type the above command like
dpkg --install libpng12-0_1.2.50-2+deb8u3_amd64.deb
Solution 2
to install .deb
packages use full path. say you have a .deb
package in /home/yourname/Downloads/packagename.deb
then use:
sudo apt-get install /home/yourname/Downloads/packagename.deb
Related videos on Youtube
![Mahmoud Hosseinipour](https://i.stack.imgur.com/IWpHr.jpg?s=256&g=1)
Mahmoud Hosseinipour
Senior Software Engineer experienced in the development of real‐time C/C++ applications with a focus on embedded/mission-critical solutions Involved in all phases of Software Development life cycle: Requirement Analysis, Designing, Development, and Testing. Specialties: Design & Developing C/C++ Applications/Firmware. Linux( Desktop/ Embedded), Build root, Busy Box, etc. Cross-compile and Builds( Cyqwin, Make, CMake). RTOS( RTX, freertos, VxWorks, etc.). STL, BOOST, QT framework. Python and Shell Scripting. Debugging( GDB, JTAG). Unit Testing and TDD. JIRA, Confluence, etc. Multi-threading. Agile( SCRUM). GIT, SVN, JIRA, Confluence. IoT. Cryptography( symmetric and asymmetric), authentication, and key management. ARM Cortex M/A, 8051, AVR, PIC platform experience( TI, NXP, ST, ATMEL, etc.). Communication Peripherals( USB, ETHERNET, SPI, I2C, UART, RS232, RS485, etc.) Sockets and network protocols( TCP, UDP, HTTP). Financial Messaging ISO8583 and Smart cards contact & contact-less technologies.
Updated on September 18, 2022Comments
-
Mahmoud Hosseinipour almost 2 years
Whenever I try to install some
.deb
packages which I downloaded before (e.g. Atom, BP-tools etc.) I receive this error in Ubuntu 17.10:./bp-tools_17.12_amd64_Xenial_free.deb ./bp-tools_17.12_amd64_Xenial_free.deb: line 1: syntax error near unexpected token `newline' ./bp-tools_17.12_amd64_Xenial_free.deb: line 1: `!<arch>'
can anyone help, please?
-
guiverc over 6 yearsare they really .deb files?; ie. if you
file bp-tools*.deb
do they report something like "Debian binary package (format 2.0)" -
pim over 6 yearsYou are trying to execute a .deb, .deb are not executable, you're expected to install them, for instance by using
dpkg -i package.deb
.
-