use apt-get update E: Failed to fetch http://...... File has unexpected size [closed] - apt

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
E: Failed to fetch http://mirrors.kali.com/kali/dists/kali-rolling/main/binary-i386/Packages.gz File has unexpected size (15320738 != 15317336). Mirror sync in progress? [IP: 111.11.111.111 80]
Hashes of expected file:
- Filesize:15317336 [weak]
- SHA256:c4762e83455984f8d3fb54f6f42836808b8c891ba117661b61240bc5774d2e02
- SHA1:fdebd56e7541e6f88d7910988ef694d3c409e21d [weak]
- MD5Sum:51400b889af8677132f31d56f266bf22 [weak]
Release file created at: Fri, 06 Oct 2017 06:55:45 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
this is the error page.How to deal with this problem?

I had the same problem. Here is my solution and it works on Kali inside VirtualBox.
Please update your /etc/apt/sources.list with
deb https://http.kali.org/kali kali-rolling main non-free contrib
Example
root#kali:~# cat /etc/apt/sources.list
deb https://http.kali.org/kali kali-rolling main non-free contrib
# deb-src https://http.kali.org/kali kali-rolling main non-free contrib
root#kali:~#
Let's update it ...
root#kali:~# apt update
Hit:1 https://archive-3.kali.org/kali kali-rolling InRelease
Reading package lists... Done
root#kali:~#
Hope this helps.

I've resolved it. It seems that you added more than one source entries in /etc/apt/sources.list. I guess more than one entry will make apt command confused, likely get header from one source then get packages from another, and the package size may not equal to the one defined in header. Edit the file and left only one source entry worked for me. Hope this helpful

Check if the firewall is blocking it. For me it was the firewall detecting the packets as malicious.

First open the file /etc/apt/sources.list, then delete all lines and add those lines
deb http://repo.kali.org/kali kali-rolling main non-free contrib
deb-src http://repo.kali.org/kali kali-rolling main non-free contrib
save and execute again
sudo apt-get update

Related

wget Unable to establish SSL connection on bash script install [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 months ago.
Improve this question
I'm trying to install a github file through bash following these instructions
https://github.com/allenai/s2orc-doc2json
bash scripts/setup_grobid.sh
but I'm getting the following error
bash scripts/setup_grobid.sh
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
--2022-07-21 20:55:25-- https://github.com/kermitt2/grobid/archive/0.6.1.zip
Resolving github.com... 140.82.121.4
Connecting to github.com|140.82.121.4|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
unzip: cannot find or open 0.6.1.zip, 0.6.1.zip.zip or 0.6.1.zip.ZIP.
rm: cannot remove '0.6.1.zip': No such file or directory
scripts/setup_grobid.sh: line 11: cd: /c/Users/User/grobid-0.6.1: No such file or directory
scripts/setup_grobid.sh: line 12: ./gradlew: No such file or directory
cp: cannot stat '/c/Users/User/git/s2orc-pdf2json/pdf2json/grobid/config.yaml': No such file or directory
cp: cannot stat '/c/Users/User/git/s2orc-pdf2json/pdf2json/grobid/grobid.properties': No such file or directory
scripts/setup_grobid.sh: line 22: ./gradlew: No such file or directory
This is the setup_grobid.sh after running it through ShellCheck.net
#!/usr/bin/env bash
# put in your pdf2json directory here
export PDF2JSON_HOME=$HOME/Desktop/s2orc-doc2json-main
# Download Grobid
cd "$HOME" || exit
wget https://github.com/kermitt2/grobid/archive/0.6.1.zip
unzip 0.6.1.zip
rm 0.6.1.zip
cd "$HOME"/Desktop/s2orc-doc2json-main/grobid-0.6.1 || exit
./gradlew clean install
## Grobid configurations
# increase max.connections to slightly more than number of processes
# decrease logging level
# this isn't necessary but is nice to have if you are processing lots of files
cp "$PDF2JSON_HOME"/pdf2json/grobid/config.yaml "$HOME"/grobid-0.6.1/grobid-service/config/config.yaml
cp "$PDF2JSON_HOME"/pdf2json/grobid/grobid.properties "$HOME"/grobid-0.6.1/grobid-home/config/grobid.properties
## Start Grobid
./gradlew run
I even tried to --no-check-certificate but still got the same error.
edit: I'm using Wget 1.11.4 / OpenSSL 1.1.1q 5 Jul 2022
Telling by
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
this might be caused by github droping support for ancient TLS version protocols https://github.blog/2018-02-01-crypto-removal-notice/ and a fairly outdated wget+openssl installation.
Try forcing a specific modern TLS protocol and see how it goes
wget --secure-protocol=TLSv1_2 https://github.com/kermitt2/grobid/archive/0.6.1.zip
or try to upgrade your installation
As a rule of thumb, start your scripts with
set -ex
So that they
stop if any instruction fails
echo the instruction that is being executed

ruby-cms-scanner : Depends: ruby-progressbar (>= 1.9.0) but it is not installed [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
dpkg: error processing archive /var/cache/apt/archives/ruby-progressbar_1.10.1-1_all.deb (--unpack):
trying to overwrite '/usr/lib/ruby/vendor_ruby/ruby-progressbar/base.rb', which is also in package ruby-ruby-progressbar 1.6.0-0kali1
Errors were encountered while processing:
/var/cache/apt/archives/ruby-progressbar_1.10.1-1_all.deb
Scanning application launchers
Updating active launchers
Done
E: Sub-process /usr/bin/dpkg returned an error code (1)
Try the below:
dpkg -i --force-overwrite /var/cache/apt/archives/ruby-progressbar_1.10.1-1_all.deb
apt --fix-broken -f install

Can't install supervisor in ec2 instance as a service manager for ASP .Net Core project [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I want to run a ASP.Net Core application with supervisor package manager in Amazon Linux 2. Execute following command to install supervisor
$sudo yum install supervisor
Its says:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package supervisor available.
Error: Nothing to do
Os detail:
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
Also tried with
$sudo yum install epel-release
Same error:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package epel-release available.
Error: Nothing to do
epel-release is available in Amazon Linux Extra topic "epel"
$sudo amazon-linux-extras install epel
And then I tried with
$sudo yum install supervisor
output!
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
150 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package supervisor.noarch 0:3.1.4-1.el7 will be installed
--> Processing Dependency: python-meld3 >= 0.6.5 for package: supervisor-3.1.4-1.el7.noarch
--> Running transaction check
---> Package python-meld3.x86_64 0:0.6.10-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
supervisor noarch 3.1.4-1.el7 epel 446 k
Installing for dependencies:
python-meld3 x86_64 0.6.10-1.el7 epel 73 k
Transaction Summary
=============================================================================================================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 519 k
Installed size: 2.5 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/epel/packages/python-meld3-0.6.10-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for python-meld3-0.6.10-1.el7.x86_64.rpm is not installed
(1/2): python-meld3-0.6.10-1.el7.x86_64.rpm | 73 kB 00:00:00
(2/2): supervisor-3.1.4-1.el7.noarch.rpm | 446 kB 00:00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.5 MB/s | 519 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) <epel#fedoraproject.org>"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-11.noarch (#amzn2extra-epel)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python-meld3-0.6.10-1.el7.x86_64 1/2
Installing : supervisor-3.1.4-1.el7.noarch 2/2
Verifying : python-meld3-0.6.10-1.el7.x86_64 1/2
Verifying : supervisor-3.1.4-1.el7.noarch 2/2
Installed:
supervisor.noarch 0:3.1.4-1.el7
Dependency Installed:
python-meld3.x86_64 0:0.6.10-1.el7
Complete!

Why is /var/lib/dpkg/status missing on a BitBake-generated OS?

I have installed apt onto a system built by BitBake by adding the apt package to the IMAGE_INSTALL variable in my recipe.
apt-get and apt-cache now execute on the built system, but if I try to do anything useful with them (such as apt-get update or apt-cache search), I get the following error:
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened
After some preliminary searching, I found this exchange on the Yocto Project mailing list:
Hi,
I have some requirement with apt-get in yocto genearted rootfs.
I built the yocto source code with enabling the apt package.
But after booting the image on my machine and run the "apt-get" command for installing some package it gives the following error.
Could not open the file /var/lib/dpkg/status open(2: no such a file or directory).
The package lists or status files could not be parsed or opened.
This error is because you need to add package-management to EXTRA_IMAGE_FEATURES in local.conf,
PACKAGE_CLASSES ?= "package_deb"
EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"
I've added package-management but don't see any different output.
After a touch /var/lib/dpkg/status, apt-get update returns the following:
Reading package lists...Done
How can I get apt into a functioning state through the use of BitBake metadata?
I have found a similar thread from the NXP website.
You would need to set up your own web server and provide all those packages and add the server URL to the source list. SourceList
In addition, you have to update the package manifest by running bitbake package-index and add PACKAGE_CLASSES ?= " package_deb" to conf/local.conf
I have successfully set up OPKG before. The steps are similar, you can find it here

how can install mkinitrd in ubuntu-14.04

root#akshit-Vostro-1550:/boot# mkinitrd -o initrd.img-2.6.32 2.6.32
mkinitrd: command not found
apt-get install mkinitrd-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mkinitrd-tools
/initrd images contains device driver which needed to load rest of the operating system later on. Not all computer requires initrd, but it is safe to create one./
After a little research I found out that in Ubuntu mkinitramfs command is used instead of mkinitrd.
Refer to this question

Resources