I tried to install jdk7 (Linux x64 rpm) on to my Amazon EC2 instance. I used wget and curl -o to do so but it did not download successfully. Instead, it downloaded an error html file wherein it tells to accept the license agreement before downloading.
I used this link http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html to accept the agreement after which I right clicked on the package and copied the link and tried downloading it through command line, but it did not work.
I downloaded it to my local machine and used scp to move it on to my local directory in EC2. But when I tried executing it, it threw these errors :
sudo rpm -i jdk-7u7-linux-x64.rpm
Unpacking JAR files...
rt.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/rt.pack
jsse.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/jsse.pack
charsets.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/charsets.pack
tools.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/lib/tools.pack
localedata.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/ext/localedata.pack
I googled for a solution and came across this link : http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html
Even though it says :
"1. Download the file. Before the file can be downloaded, you must accept the license agreement." is there any way of accepting the license through command line?
Thank you!
I don't think this issue is caused by a problem accepting the license agreement (that is just to download), I think this is related to a buggy rpm package. Post this rpm -i install, does java work? Can you navigate to /usr/java/jdk1.7.0_07/jre/bin and run java?
For me it worked the following
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.rpm
It's not you, it is the Oracle site. They changed their licensing strategy.
Read this blog post for more information, and some tips on automating it.
An interesting tidbit at the bottom of the post:
According to the OTN BCL document for Java SE:
BY SELECTING THE “ACCEPT LICENSE AGREEMENT” (OR THE EQUIVALENT) BUTTON
AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE
TERMS AND AGREE TO THEM.
There's a simple way:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=yippi ka yei madafaka;" http://download.oracle.com/blahblah....
You can send anything you want as cookie value for "gpw_e24"
P.D: Excuse my poor english, trying my best ;-)
Related
I am trying to learn more about operating system and am following this tutorial: https://youtu.be/ZiHtuBnVrx4?list=PLHh55M_Kq4OApWScZyPl5HhgsTJS9MZ6M. Everything was going smoothly until the point where I had to use grub-mkresuce to create an iso image to use with a virtual box. I am getting an error saying "your xorriso doesnt support '--grub2-boot-info'. Some features are disabled. Please use xorriso 1.2.9 or later.."
I am left confused and without an iso image. I have looked online for a solution but failed to find any. Any help will be greatly appreciated.
if your operating system does not offer a package "xorriso" or "libisoburn",
or if they are older than version 1.2.9 (1.3.0 was released in 2013), then
download and compile GNU xorriso. (MS-Windows users may need Cygwin to get
the necessary compiler and linker tools.)
cd ...some.work.directory...
wget https://www.gnu.org/software/xorriso/xorriso-1.5.0.tar.gz
tar xzf xorriso-1.5.0.tar.gz
cd xorriso-1.5.0
./configure && make
Check whether the result is willing to work:
xorriso/xorriso
which should say
GNU xorriso 1.5.0 : RockRidge filesystem manipulator, libburnia project.
usage : xorriso/xorriso [commands]
More is told by command -help
You do not need to install it. Rather obtain its absolute address:
ls $(pwd)/xorriso/xorriso
and use it with the grub-mkrescue option "--xorriso=":
grub-mkrescue --xorriso=...absolute.address.of.xorriso...
Have a nice day :)
The following apparently trivial two initial steps to install mod-pagespeed resulted in the error,
'mod-pagespeed-stable_current_amd64.deb' is not a debian format archive
even though the first (wget) step appeared to work properly.
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
sudo dpkg -i mod-pagespeed-*.deb
What might be going wrong and how to fix that?
In my case the .deb file was much smaller than expected and its content indicated that "this product is not available in your country," even though the server was meant to be in the UK, and https://www.countryipblocks.net/ agreed that it was in the UK. (http://whatismyipaddress.com/ip-lookup said it was in the US.)
The solution was simply to go to the Google download page for the module, https://developers.google.com/speed/pagespeed/module/download, do a local download (eg right click the appropriate link and do "Save link as ..." in Firefox), and then upload that to the server.
It then built fine.
(I found this solution in a comment about a different problem at http://www.turnkeylinux.org/forum/support/20120514/how-do-i-install-modpagespeed, which speculated that "server's IP was somehow mistraced by Google to some weird country or something" - could this be the underlying cause?)
Edit: Possible gotcha: Later problems with apt-get update with a GPG error (fatal) with the mod-pagespeed installation being the very smoky gun. It was a mess to sort out.
I've been been desperately trying to add SFTP and SCP support for Curl on my CentOS box. I found something resembling a solution here:
http://andrewberls.com/blog/post/adding-sftp-support-to-curl
I followed these steps but found that when attempting to get a file via both SCP and SFTP, the connection hangs once the file has been found. I cannot fix this and cannot find an alternative solution.
I have to use Curl for a job at work and therefore cannot use another lib. Has anyone managed to successfully add support for SCP and SFTP on Curl? I have a test server setup and other protocols such as FTP work as expected.
Any help would be greatly appreciated!
Thanks in advance,
Peter
Although Curl does support SFTP, support isn't automatically included in the default package.
This website: http://andrewberls.com/blog/post/adding-sftp-support-to-curl provided the details which helped me add the required support for SFTP. As the site didn't work 100% for me, I've outlined the different steps taken below.
Manually downloading libssh2 didn't work for me so I used yum to install the two packages:
yum install libssh2 libssh2-devel
and then followed step two configuring Curl to install using the above libraries
The final step was to restart sshd:
service sshd restart
There you have it. Double check that SFTP is on the list of support protocols by running
curl -V
When I initially tested, Curl complained about key authentication issues, but you can force Curl to use any authentication to connect:
curl --anyauth sftp://user:passwd#127.0.0.1/directory -o Test.txt
This will round robin the different supported authentication methods and let you use you login credentials instead.
I hope this helps alleviate any other headaches for people trying to achieve the same.
I'm receiving the below error at work (with a proxy) when running the Google Cloud SDK install script (gcloud.components.update) Unable to fetch /components-2.json
I've viewed this thread
Error while installing Google Cloud SDK in Cygwin : Unable to fetch https://dl.google.com/dl/cloudsdk/release/components-2.json
I've added in the proxy information and I can download the installer (if I don't set the proxy I can't access this).
curl /dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
I can run curl https://dl.google.com/dl/cloudsdk/release/components-2.json
I'm running Python 2.7 and I'm on Windows XP. If its a proxy issue why can I download the files and access the page but can't run the login script?
I can download a local version of components-2.json I can also download all of the files that this file refers to.
Is there a config file I can edit to get it to look at the local versions of these files?
I can seems to find where the address /components-2.json is specified.
Cheers and thanks,
Rohan
PS sorry I couldn't include more than 2 links as I don't have a reputation, even though posting requirement mentions to show research.
As an alternative, please try the following:
Download google-cloud-sdk.zip or google-cloud-sdk.tar.gz
Unpack the archive
Run the ./google-cloud-sdk/install.sh script
This is described in small print on the Google Cloud SDK page, underneath the text box that suggests running the command you're likely using:
curl https://sdk.cloud.google.com | bash
I am trying to install the Net::LDAP module on an OEL box using CPAN, but I get the following error:
[root ~]# cpan -i Net::LDAP
CPAN: Storable loaded ok
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Could not pipe[ --decompress --stdout /root/.cpan/sources/authors/01mailrc.txt.gz |]: No such file or directory at /usr/lib/perl5/5.8.8/CPAN.pm line 5726.
Can someone please guide me on how to troubleshoot this?
CPAN needs to be configured before you can use it to install stuff.
There should be a whole bunch of stuff under
/root/.cpan
Generally cpan gets this stuff automatically, but for some reason it's
not there on your machine. In particular it needs this file.
/root/.cpan/sources/authors/01mailrc.txt.gz
If that file is there, then cpan man be missing the gzip binary needed to uncompress that file.