LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-10-2019, 06:11 AM   #16
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled

Have you tried Python's urllib? Since yum is Python, I wonder if it is doing something different:

Code:
$ python2
Python 2.7.13 (default, Sep 26 2018, 18:42:22) 
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> u = urllib2.urlopen('https://www.lua.org/ftp/lua-5.3.5.tar.gz')
>>> f = open('/tmp/lua.tgz', 'wb')
>>> f.write(u.read())
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> exit()
$ ls -l /tmp/lua.tgz 
-rw-r--r-- 1 tyler tyler 303543 May 10 07:10 /tmp/lua.tgz
Just make sure that the URL you try doesn't have any redirects.
 
Old 05-10-2019, 07:59 AM   #17
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 116

Original Poster
Rep: Reputation: 7
Nice thinking. Okay, I used the same Python code as you offered, amending the URL to one which I've previously tried unsuccessfully with curl and wget, and it worked just fine -- fast and complete. In fact I tried it a couple of times to make sure it wasn't a fluke, and it worked just fine each time.

Hmmm. So, I guess that determines something at least, which is useful, as it kinda rules out a bunch of other stuff, but I'm not sure how to use this latest knowledge to effect a solution with non-Python tools such as curl/wget/etc.

I guess there must be some common library or something which the latter is using which isn't playing nicely for some reason, but I've no clue how to figure that out or how to fix it. My first inclination would be simply to ensure that CentOS is up to date, but I regularly do yum updates, and the machine doesn't think there's currently anything to update.

Thank you very much indeed for pointing me in a new direction; am hoping that maybe someone can now help me across the finish line!
 
Old 05-10-2019, 08:17 AM   #18
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled
What does your /usr/local look like? Do you have anything you built from source in there? Did you build curl or wget from source? Your version of curl is newer than the one in the standard repositories. Assuming a yes, verify the compile time options and try setting LD_LIBRARY_PATH to /usr/local/lib or wherever you put it.
 
Old 05-10-2019, 08:44 AM   #19
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 116

Original Poster
Rep: Reputation: 7
Actually, I don't recall exactly where I got the version of curl from, but it wasn't built from source; the reason it is a very recent version is that - in attempting to find a solution to the download problem - I'd been endeavoring to ensure everything that could possibly be updated was updated (i.e. the problem existed before this most recent version of curl was installed), but obviously it didn't make any difference in the end.

Nothing in /usr/local/ of any consequence (I don't think): /usr/local/src/ is empty, as is /usr/local/lib/.
 
  


Reply

Tags
centos, curl, wget


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS-7: curl & wget only working infrequently, but yum works fine cheddarcheese Linux - Networking 4 03-10-2019 06:52 AM
[SOLVED] yum works but wget/curl does not. PoleStar Linux - Newbie 4 12-03-2018 02:13 PM
2nd monitor is detected infrequently amukher Linux - Desktop 1 11-29-2015 07:06 AM
yum working fine on server and ftp is working f9 but not able to config yum on client joj123 Red Hat 12 01-13-2015 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration