When i try t install, i get error:
aptitude install hudson
The following NEW packages will be installed:
hudson
0 packages upgraded, 1 newly installed, 0 to remove and 279 not upgraded.
Need to get 38.8MB of archives. After unpacking 39.7GB will be used.
WARNING: untrusted versions of the following packages will be installed!
Untrusted packages could compromise your system's security.
You should only proceed with the installation if you are certain that
this is what you want to do.
hudson
Do you want to ignore this warning and proceed anyway?
To continue, enter "Yes"; to abort, enter "No": Yes
Get:1 http://hudson-ci.org/debian/ binary/ hudson 1.397 [38.8MB]
Fetched 1B in 0s (2B/s)
E: Failed to fetch http://hudson-ci.org/debian/binary/hudson_1.397_all.deb: Size mismatch
apt-get clean
apt-get update
apt-get install hudson
this should work.
This question is probably best posted to serverfault.com; but regardless; it appears the mirror you are using is busted and you most likely downloaded an error page (which is why the failure). Try doing an update for your repository to get the latest mirror information.
apt-get update
execute aptitude update first
I had the same problem.
I followed the steps here: http://makeitfaster.wordpress.com/2010/12/14/install-the-hudson-build-server-on-ubuntu-10-10-server/
Which then also failed at the "sudo dpkg --install /tmp/hudson.deb" line. Then I did this:
aptitude install openjdk-6-jre
At which point hudson finished installing and came on line.
I've got the same problem...
Need to get 38.8MB of archives. After
this operation, 39.7GB of additional
disk space will be used. WARNING: The
following packages cannot be
authenticated!
hudson Install these
packages without verification [y/N]? y
Get:1 http://hudson-ci.org/debian/
binary/ hudson 1.397 [38.8MB] Fetched
38.8MB in 59s (655kB/s)
Failed to fetch
http://hudson-ci.org/debian/binary/hudson_1.397_all.deb
Size mismatch E: Unable to fetch some
archives, maybe run apt-get update or
try with --fix-missing?
I have done
apt-get clean
apt-get update
apt-get install hudson
as root.
Still don't understand what the size mismatch is - I can't see any errors downloaded.
The main difference between me and the original poster is that I am downloading 38.8MB, but it still reports the wrong size.
Related
I don't know how to describe my problem because I don't understand why it happen ... When i enter
sudo dnf install (any packet)
It return me this
Tor Project Repo 407 B/s | 264 B 00:00
Error: Failed to download metadata for repo 'Tor': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Its obvious that Tor is related to that mess but i don't know why.
I tried nothing because I'm afraid to do something wrong. I'm on fedora 30.
(english baguette)
It seems like you have a broken repository. Probably you will find this repository in:
ls /etc/yum.repos.d/
there will probably be a file named tor*.repo. If you remove that file (or edit it to contain enabled=0), then dnf should start working correctly again.
Failed to download metadata for repo ‘bintray–resin-io-redhat’: Cannot download repomd.xml: Cannot download repodata/repomd.xml
I was getting same error for kubernetes.repo. It got resolved by setting enabled=0 in /etc/yum.repos.d/kubernetes.repo. Now I can download other package (example Nginx that I was unable to download).
I tried this command and my problem fixed:
sudo rm -r /var/cache/dnf
This worked for me -
cd /etc/yum.repos.d
rm -rf .
yum upgrade
yum update
Note: redhat.repo will regenerate itself on the next yum run, and in the process some repositories will stay lost, be careful.
I am using AWS Elastic Beanstalk on a Linux machine and need to install some fonts in .ebextensions:
container_commands:
01_getfont:
command: sudo yum -y install http://somesite.com/rpm/webcore-fonts-3.0-1.noarch.rpm
That works well the 1st time, with the fonts installed.
The 2nd time when I deploy the EB again, it now gave me this error:
Application update failed at 2019-01-28T23:44:14Z with exit status 1 and error: container_command 01_getfont in .ebextensions/fonts.config failed.
Loaded plugins: priorities, update-motd, upgrade-helper
Examining /var/tmp/yum-root-0Yx1DY/webcore-fonts-3.0-1.noarch.rpm: webcore-fonts-3.0-1.noarch
/var/tmp/yum-root-0Yx1DY/webcore-fonts-3.0-1.noarch.rpm: does not update installed package.
Error: Nothing to do.
How do I avoid getting that errors when that package has been installed on the same EC2 instance the 2nd time?
I found out the answer to this problem later, posting it here for the benefits of others with similar issue.
I use reinstall instead:
sudo yum -y reinstall http://somesite.com/rpm/webcore-fonts-3.0-1.noarch.rpm
This will work the 1st time and all other times of deployment.
Edit:
The above does not work as well as reinstall will fail if package is not installed. I ended up detecting if the package has been installed, if not, install it else re-install:
command: sudo yum -q list installed webcore-fonts.noarch &>/dev/null && sudo yum -y reinstall http://somesite.com/rpm/webcore-fonts-3.0-1.noarch.rpm || sudo yum -y install http://somesite.com/rpm/webcore-fonts-3.0-1.noarch.rpm
Use the packages directive:
packages:
rpm:
webcore-fonts: http://somesite.com/rpm/webcore-fonts-3.0-1.noarch.rpm
This will handle not installed and already installed scenarios.
Yum can return a non-zero exit status for things that are not really errors, causing higher-level systems such as Elastic Beanstalk to think the script has failed.
In particular, yum sometimes says "Nothing to do" with exit status of 1 - this can mean various things but includes the case where required packages are already installed.
The way I work around this for scripts using yum is:
yum -y install somepackage
if [ $? -ne 1 ]; then # Exit on any any error except 'nothing to do'
exit 0
fi
A simpler way is just to ignore all errors by appending a true or exit 0 command - however, this is eventually going to bite you when the Yum repo is unreachable, or Yum has out of date metadata, etc.
Advanced tip
If you have several yum commands, or more error codes to handle, you might want to read up on the shell trap command, specifically on EXIT or ERR which lets you handle these cases in a single place, and potentially not exit on unwanted errors. See this stack for more on this.
Alternative for local installs
See this answer for more, including a simple alternative when installing RPMs that you have downloaded.
I'm having trouble setting up 2 factor authentication in Ubuntu Server 18.04.
I'm following this tutorial: http://www.ubuntuboss.com/how-to-set-up-2-factor-authentication-in-ubuntu-server-18-04/
But on the first step when I try to install the package I get the package not found error as seen in the title.
sudo apt-get install libpam-google-authenticator
I have looked around to see if the package has been updated and goes by a different name and I am sure I have the most recent version of the package manager.
Has the package changed or is there anyway around this problem.
Had the same problem. Turned out it's because Ubuntu Server doesn't include the Universe Repository.
Add this line
sudo add-apt-repository universe
Then run the command again and it will install.
I found a way round this issue,
/tmp$ wget http://launchpadlibrarian.net/326531917/libpam-google-authenticator_20170702-1_amd64.deb
I was able to manually install it via this link and installed the missing dependencies the same way and was able to finish the tutorial as normal.
I'm trying to get some packages to install in Raspian Jessy, running command:
sudo apt-get upgrade
but it fails with:
'libpam-runtime' is missing final newline
I'm tried numerous suggestions I found online like:
1) reinstalling the package with:
apt-get install libpam-runtime --reinstall
This does nothing different.
etc.
Full output looks like:
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
bind9-host debconf debconf-i18n debconf-utils libbind9-90 libdns-export100 libdns100 libgcrypt20
libgnutls-deb0-28 libgnutls-openssl27 libirs-export91 libisc-export95 libisc95 libisccc90 libisccfg-export90
libisccfg90 liblwres90 libwbclient0 perl perl-base perl-modules samba-common
22 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9,237 kB of archives.
After this operation, 14.3 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Reading changelogs... Done
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libpam-runtime' is missing final newline
updated error
When I try to run:
the purge command I got:
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libpam0g:armhf' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
But, I have not found a solution after nearly 3 hours.
Does anyone have any suggestions?
Thank you.
You can try to completely uninstall package and install it again
sudo apt-get purge libpam-runtime
sudo apt-get install libpam-runtime
Your files on libpam can't complete or corrupt. I reccomended your download frpm library sites of libpam and trying manual installing I think so safety.
I have installed rpm from this site 1- Zabbix 2.4 download page for centos7
And I have been following installation instructions on this site 2- Zabbix.org centos installation instructions
first, I configure zabbix repository
rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
But, then I realized this repository is for /rhel/6. Then I run the command below to change the zabbix repository which is for /rhel/7 , since I use centos 7.
rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
rpm -Uv http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
Then, I try to install zabbix
yum install mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway
But I couldn't because of some dependency could not be installed.
--> Finished Dependency Resolution
Error: Package: zabbix-server-mysql-2.4.5-1.el6.x86_64 (zabbix)
Requires: libmysqlclient.so.16()(64bit)
Error: Package: zabbix-server-mysql-2.4.5-1.el6.x86_64 (zabbix)
Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)
Error: Package: zabbix-server-mysql-2.4.5-1.el6.x86_64 (zabbix)
Requires: libnetsnmp.so.20()(64bit)
Error: Package: iksemel-1.4-2.el6.x86_64 (zabbix-non-supported)
Requires: libgnutls.so.26()(64bit)
Error: Package: iksemel-1.4-2.el6.x86_64 (zabbix-non-supported)
Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I have searched a bit and I have came accross a lot of people has same problem and you can find some offered solutions to the problem. I have tried to implement the offered solutions but non of them solved the problem.
3.1- Offered solution from centos.org/forum : I could not understand this, I run the commands and result are shown below.
rpm -qR postfix
libmysqlclient.so.18()(64bit)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
rpm -q mysql-libs
package mysql-libs is not installed
3.2- Offered solution from centos.org/forum This problem seems very similar but it does not helped either
3.3- Offered solution from zabbix.com/forum This problem seems exactly same, and a solution is offered. But I could not understand it.
Also, I found that on Zabbix official documentation 4- Zabbix 2.4 manual
Supported for versions: RHEL6, CentOS 6
centos 7 is not listed here, but it contradicts with Zabbix download page, since they provide a link for centos 7. you can check first link.
Please share if you have any idea how to solve this problem.
As #Jan Garaj pointed, the problem was yum try to install el6 packages, although I have changed the zabbix repository which is for rhel/7.
So, I have just cleaned the cache with the commands below and problem is resolved.
yum clean headers
yum clean packages
yum clean metadata
You can find more information about cleaning yum caches on this site:
Centos/clearing yum caches
You can find information about removing a yum repository on tihs site, Just cleaning cache solves this problem, so I did not try to remove yum repository. But, it can be useful if cleaning cache does not help.
serverFault/how to remove yum repo
I had similar problem while installing nginx. For me what helped was continuous release repository CR
Usage:
yum -y install yum-utils
yum-config-manager --enable cr