When trying to upgrade my Raspbian (8.0 jessie) on my Raspberry Pi 2 with sudo apt-get upgrade, I'm getting the following error:
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/perl_5.20.2-3+deb8u12_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/arm-linux-gnueabihf/perl/5.20.2/auto/Unicode/Collate/Collate.so' to
'/usr/lib/arm-linux-gnueabihf/perl/5.20.2/auto/Unicode/Collate/Collate.so.dpkg-new': unexpected end of file or stream
Preparing to unpack .../perl-base_5.20.2-3+deb8u12_armhf.deb ...
Unpacking perl-base (5.20.2-3+deb8u12) over (5.20.2-3+deb8u6) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/perl-base_5.20.2-3+deb8u12_armhf.deb (--unpack):
cannot copy extracted data for './usr/share/perl/5.20.2/unicore/lib/Nt/Nu.pl' to
'/usr/share/perl/5.20.2/unicore/lib/Nt/Nu.pl.dpkg-new': unexpected end of file or stream
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/perl_5.20.2-3+deb8u12_armhf.deb
/var/cache/apt/archives/perl-base_5.20.2-3+deb8u12_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Does anyone have any ideas?
I've already done sudo apt-get update and sudo apt-get clean.
The deb file itself is corrupt.
You can remove it, and run update/upgrade again. It will download a new version.
Like this:
cd /var/cache/apt/archives
sudo rm perl_5.20.2-3+deb8u12_armhf.deb
sudo apt-get update
sudo apt-get upgrade -y
Related
I am using RHEL 9.1 machine where I am trying to install a package 'python3-distro' but I am getting error:
Error: Failed to download metadata for repo 'advanced-virtualization': Cannot prepare internal mirrorlist: No URLs in mirrorlist
can anyone please help me resolve this issue?
I was expecting 'sudo dnf install python3-distro' to work successfully.
I tried running below cmds:
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*
and as result after reboot I am getting below error:
Error: Failed to download metadata for repo 'advanced-virtualization': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Output- ls 'yum.repos.d'
$ls /etc/yum.repos.d/
advanced-virtualization.repo nfv-openvswitch.repo redhat.repo
ceph-pacific.repo rdo-release.repo
messaging.repo rdo-testing.repo
Any help would be appreciated.
I was trying to install MongoDb on Ubuntu 22.04 but i couldnt or there were some errors so I decided uninstall everything and reinstall fresh. So i did some purge commands that i found on the net and after doing that now if I do: sudo apt update
i get the following messages
E: Malformed entry 1 in list file /etc/apt/sources.list.d/mongodb-org-6.0.list (Component)
E: The list of sources could not be read.
i used the following command to delete mongodb >sudo apt-get purge mongodb-org* –
Getting $ sudo apt-get purge mongodb-enterprise E: Malformed entry 1 in list file /etc/apt/sources.list.d/mongodb-enterprise.list (URI) E: The list of sources could not be read. E: Malformed entry 1 in list file /etc/apt/sources.list.d/mongodb-enterprise.list (URI) E: The list of sources could not be read..
I also used the following command to delete mongodb > sudo rm /etc/apt/sources.list.d/MongoDb.list
here again i am getting the following message :-
sudo rm /etc/apt/sources.list.d/MongoDb.list
rm: cannot remove '/etc/apt/sources.list.d/MongoDb.list': No such file or directory
I am trying to generate the Kibana plugin and for that I already downloaded the .zip file from the github.
However while preparing for the Kibana development environment, I got an error as mentioned below from yarn kbn bootstrap cmd:
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 128: git merge-base HEAD FETCH_HEAD fatal: Not a valid object name HEAD
Note:
I already sudo git init
Steps followed so far
sudo wget https://github.com/elastic/kibana/archive/refs/tags/v7.17.0.zip
sudo apt-get install unzip
sudo unzip v7.17.0.zip
sudo mv kibana-v7.17.0 kibana
sudo chmod -R 777 kibana-7.17.0
sudo yarn add require-in-the-middle
sudo yarn add symbol-observable
sudo yarn add source-map-support
sudo yarn add lodash
sudo git init
sudo yarn kbn bootstrap -- failed
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 128: git merge-base HEAD FETCH_HEAD
fatal: Not a valid object name HEAD
Collecting psycopg2 Using cached psycopg2-2.8.5.tar.gz (380 kB)
ERROR: Command errored out with exit status 1: command: /home/ubuntu/egrdb/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv0 = '"'"'/tmp/pip-install-gn70jweq/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-gn70jweq/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4tr67ll8 cwd: /tmp/pip-install-gn70jweq/psycopg2/ Complete output (7 lines): running egg_info creating /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info writing /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-4tr67ll8/psycopg2.egg-info/SOURCES.txt' Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
If you want to install the source version psycopg2-2.8.5.tar.gz then you will need to do as #Chris says. The simpler way though is to do:
pip install psycopg2-binary
Then you get a pre-compiled version and you don't need the -dev packages.
I was trying to install MongoDb on Ubuntu 17.10 but i couldnt or there were some errors so I decided uninstall everything and reinstall fresh. So i did some purge commands that i found on the net and after doing that now if I do: sudo apt update
i get the following messages
sudo apt update
E: Malformed entry 1 in list file /etc/apt/sources.list.d/MongoDB.list
(Suite)
E: Malformed entry 1 in list file /etc/apt/sources.list.d/mongodb.list
(Suite)
E: The list of sources could not be read.
In this case, as you dont have a specific line wrong in the file, better delete the file MongoDB.list and add again the respective PPA.
Try:
sudo rm /etc/apt/sources.list.d/MongoDb.list
Add again the PPA from MongoDb. Now is time to update by running.
sudo apt-get update
Try running following command
sudo sed -i -e '1d' /etc/apt/sources.list.d/mongodb-org-3.4.list
This would produce following error
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/mongodb-org-3.6.list
E: The list of sources could not be read.
Now to fix this, go to /etc/apt/sources.list.d and then open it with
nano mongodb-org-3.4.list
And here remove the double quotes (")
Try running sudo apt-get update now. Hopefully it will work.