Corrupted filesystem tarfile - corrupted package archive Ubuntu - linux

I'm trying to compile and install an open source application on Ubuntu. I can make the application, make the installer, and make the package. I don't see any error during those steps. when I issue the dpkg -i to install it if fails with the following error.
dpkg: error processing archive application.deb (--install):
corrupted filesystem tarfile - corrupted package archive
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
I can only find references to fixing the issue when downloading files and say to issue apt-get clean and purge. I've done that and it doesn't work and it doesn't seem applicable since I'm creating the install file. When I issue dpkg -c application.deb, it shows me the contents, so the file isn't total corrupted.
Any suggestions on how to get this application to install?

Following the description on https://github.com/Brewtarget/brewtarget on a newly installed Ubuntu 14.04.3 gives me a .deb that installs.
These are the commands I ran:
$ sudo apt-get install cmake git qtbase5-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5webkit5-dev libqt5sql5-sqlite libqt5svg5 libqt5multimedia5-plugins doxygen
$ git clone https://github.com/Brewtarget/brewtarget.git
$ mkdir brewtarget-build
$ cd brewtarget-build
$ cmake ../brewtarget
$ make
$ make package
$ sudo apt-get install libphonon4 libqt4-webkit phonon phonon-backend-vlc
$ sudo dpkg -i brewtarget*.deb
Selecting previously unselected package brewtarget_2.2.0.
(Reading database ... 175209 files and directories currently installed.)
Preparing to unpack brewtarget_2.2.0_x86_64.deb ...
Unpacking brewtarget_2.2.0 (2.2.0-1) ...
Setting up brewtarget_2.2.0 (2.2.0-1) ...
$ file *.deb
brewtarget_2.2.0_x86_64.deb: Debian binary package (format 2.0)
What version of Ubuntu are you running?
It is odd that your error message says "application.deb", as I got a .deb named "brewtarget_2.2.0_x86_64.deb" when following the instructions.

Try these commands
# sudo dpkg -i --force-overwrite application.deb
After that run
# sudo apt-get -f install

Related

E: Unable to locate package arm-none-eabi-gcc

I'm working on a project in which I've to compile a MicroPython stack and build a firmware file for my STM32 boards. At present, I'm following through the instruction set given on https://docs.micropython.org/en/latest/develop/gettingstarted.html. Hence, to compile the code, I need an ARM cross-compiler (mentioned on the website). After entering the following command on the terminal "sudo apt-get install arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib", I'm getting some errors (basically, unable to locate packages). I tried googling a lot but didn't come across any relevant links. Does anyone know what I need to do?
My pc configurations are AMD Ryzen 5 processor (IdeaPad 3 15ALC6), and I'm using Ubuntu 22.04.1 LTS OS. The snippet of the error is given below:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package arm-none-eabi-gcc
E: Unable to locate package arm-none-eabi-binutils
E: Unable to locate package arm-none-eabi-newlib
I found the solution based on the discussion available at https://unix.stackexchange.com/questions/377345/installing-arm-none-eabi-gcc and the documentation available on https://mynewt.apache.org/latest/get_started/native_install/cross_tools.html#installing-the-arm-cross-toolchain.
The name and structure of the software changed over time. The arm-none-eabi-gcc is gcc-arm-none-eabi now, and so on.
$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install gcc-arm-none-eabi
$ sudo apt-get install gdb-arm-none-eabi
And finally, to verify the downloads, you can run the following commands:
arm-none-eabi-gcc --version
arm-none-eabi-g++ --version
arm-none-eabi-size --version
In /etc/apt/sources.list, make sure the lines with universe are uncommented.
Re-run apt update and (as long as you have a working internter connection) it should work.

Can't Fix Broken Git installation on Ubuntu

I was trying to install git on ubuntu, but there is an error when I try to install or fix broken
git installation.
This is the error:
cp: cannot stat '/usr/lib/git-core/git': No such file or directory
dpkg: error processing archive /var/cache/apt/archives/git_1%3a2.17.1-1ubuntu0.8_amd64.deb (--unpack):
new git package pre-installation script subprocess returned error exit status 1
dpkg-query: warning: files list file for package 'git' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'git' missing; assuming package has no files currently installed
Errors were encountered while processing:
/var/cache/apt/archives/git_1%3a2.17.1-1ubuntu0.8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried other possibles solutions, I will list here:
apt --fix-broken install. Error: The same problem as above.
apt purge git. Show me to make an apt fix broken install
sudo dpkg -i --force-overwrite /var/cache/apt/archives/git_1%3a2.17.1-1ubuntu0.8_amd64.deb. Error: dpkg-query: warning: files list file for package 'git' missing; assuming package has no files currently installed
I tried to remove all files inside dpkg/updates, apt/lists, apt/*.bin, and clen apt-get, to try to force the installation, but again the same error above.
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists/*
sudo rm /var/cache/apt/*.bin
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -f
I tryed to remove the git .deb file from /var/cache/apt/archives and install git again, but doesn't work.
I resolved the problem with the commands below:
sudo apt-mark hold git
sudo dpkg -r --force-depends git
And then install git-core
sudo apt install git-core

converting rpm files to debian error (package build failed)

after I install alien and
having zenmap in the download folder
when I run this command alien zenmap-7.91-1.noarch.rpm or any command related to it I get this error
package build failed. here's the log:
dh
dh: error:specify sequence to run
make:***[debian/rules:7:binary]Error 25
how do I fix this error? please help...
First just to make sure you don't have any rpm problems run this command:
apt-get --fix-broken install
Then you may need these:
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget http://azure.archive.ubuntu.com/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb
dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb
dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb
dpkg -i python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
And after you have all that installed lets make sure our alien version is 8.90.
Remove alien:
apt-get remove alien
Download alien 8.90 version here.
Install alien:
dpkg -i alien_8.90_all.deb
Now we will locate our zenmap file and run these commands:
sudo alien zenmap-7.91-1.noarch.rpm
sudo dpkg -i **YOUR-ZENMAP-FILE**.deb
If those commands run perfectly you can now run:
sudo zenmap
Et voilĂ ! :)
I had the same issue installing Zenmap in kali linux.
Package build failed. Here's the log:
dh: error: specify a sequence to run make:
*** [debian/rules:7: binary] Error 25
To solve this, I had to downgrade to Alien version 8.90, since I was using 8.95.3
There is some information online, and it's also detailed in the changelogs as well, explaining some changes performed on the latest alien updates and how they read the dh headers. Zenmap.rpm packages seem to be non-compilant with these updates.
I downgraded to a different Alien version to skip these dh verification changes.
To do so, I uninstalled the current alien version with
apt-get remove alien
Then, from https://pkgs.org/download/alien I downloaded Ubuntu Main amd64 Official alien_8.90_all.deb
installed with: dpkg -i alien_8.90_all.deb
Downloaded the latest Zenmap rpm version here
https://nmap.org/dist
and successfully converted rpm to deb running
alien zenmap-X.XX.noarch.rpm
Once the RPM was converted to .deb, you could run
dpkg -i zenmap-X.XX.noarch.deb
App would not open, running from CLI I figured that some python libs failed to load
Could not import the zenmapGUI.App module: 'No module named gtk'. I
checked in these directories:
/usr/bin
/usr/share/offsec-awae-wheels/colorama-0.4.3-py2.py3-none-any.whl
/usr/share/offsec-awae-wheels/pyOpenSSL-19.1.0-py2.py3-none-any.whl
...
As suggested in this post I download the packages:
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget http://azure.archive.ubuntu.com/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb
Then installed with dpkg
dpkg -i python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb
dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb
Now Zenmap is working beautifully.
You can install the package directly using -i option:
sudo alien -i zenmap-7.91-1.noarch.rpm
Also you can use fpm to convert an rpm to deb, to install it:
sudo apt install ruby ruby-dev rubygems build-essential
sudo gem install --no-document fpm
To convert:
fpm -s rpm -t deb zenmap-7.91-1.noarch.rpm
I encountered the same exact issue, I was using
alien -i package.rpm
I believe this error occurred because of an update to the bullseye version from bullseye/main alien all 8.95+nmu1 to bullseye/main alien all 8.95.3. Updating Debian preferences to install alien from buster with version buster/main alien all 8.95 fixed the issue for me! Hope this helps!

Ubuntu install PHP couchbase extension

I run composer install for new project and I got eror:
the requested PHP extension couchbase is missing from your system. To enable extensions, verify that they are enabled in your .ini files:
So I was trying to intall couchbase SDK from official website:
# Only needed during first-time setup:
wget http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-4-amd64.deb
sudo dpkg -i couchbase-release-1.0-4-amd64.deb
# Will install or upgrade packages
sudo apt-get update
sudo apt-get install libcouchbase-dev libcouchbase2-bin build-essential
after sudo dpkg -i couchbase-release-1.0-4-amd64.deb i got error:
(Reading database ... 155822 files and directories currently installed.)
Preparing to unpack couchbase-release-1.0-4-amd64.deb ...
Supported platforms are: Debian/wheezy,jessie and Ubuntu/lucid,precise,trusty,xenial
dpkg: error processing archive couchbase-release-1.0-4-amd64.deb (--install):
new couchbase-release package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
couchbase-release-1.0-4-amd64.deb
I use Ubuntu 18.04 LTS and PHP 7.1

deb package creation using fpm with build dependencies

I'm trying to create a deb package using fpm, which contains some shell script files.But the deb package should create with a dependency called vim(vim editor in Linux). Means when installing deb package it should install vim first and then script files.
Requirement is when installing deb package the vim should install first and then script files.
The fpm command I have tried is :
fpm -s dir -t deb -n 'test' --deb-pre-depends vim --after-install /home/test/testfile.sh -C /home test
And after deb package created. when installing it, I'm getting following errors:
dpkg: regarding test_1.0_amd64.deb containing test, pre-dependency problem:
test pre-depends on vim
vim is not installed.
dpkg: error processing archive test_1.0_amd64.deb (--install):
pre-dependency problem - not installing test
Errors were encountered while processing:
test_1.0_amd64.deb
Thanks in Advance...
As #Vorsprung as alredy mentioned you need to use --depends:
fpm -s dir \
-t deb \
-n 'test' \
--depends vim \
--after-install /home/test/testfile.sh \
-C /home test
You need to be aware that dpkg won't install the dependencies for you, but you can run apt-get afterwards to install all the missing dependencies:
dpkg -i test.deb
apt-get install -f
try --depends instead of --deb-pre-depends
"Depend" and "Pre Depend" are subtly different see here https://www.debian.org/doc/debian-policy/ch-relationships.html
Sounds like what you want to do is probably "Depend" so keep it simple

Resources