LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A fix to a probably a bug? "Linux Lite cannot check for Updates"
#1
So recently I've noticed 'lite-updates' won't run and shout at me that there's no internet connection even though there actually is.
After digging in the internet I was led into that post from Nov' 17 where Jerry uploaded a script for updates-gui
I've noticed the script contains a connection check:
Code:
# Check Internet access
if eval "curl -sk google.com" >> /dev/null 2>&1; then :; else # Prompt ERROR internet connection check failed and exit
  yad --center --borders=15 --info --width="320" --height="120" --window-icon="$_ICON" --button=gtk-ok:1 --title="$_APPNAME" \
         --text="\n<b>Your computer is not connected to the Internet.</b> \n \nLinux Lite cannot check for Updates.\nPlease check your internet connection and try again.\n" --text-align center 2>/dev/null
  rm_temp_files; exit 0
fi

So I tried running the check myself. I did:
Code:
curl -sk google.com
Only to found out that 'curl' has been removed from my system and the output of the command didn't evaluated to TRUE  Sad

In my case the fix was just reinstall it:
Code:
sudo apt-get install curl

This is the second time this is happened to me, sometimes 'curl' get removed when upgrading or installing software that don't need curl as a dependency and overrides it with different version of curl (libcurl3 something?)

I don't know if its a bug but maybe there's a better way to check for internet connection than 'curl'?
Reply
#2
Hi [member=6970]Roy[/member] , did your system update earlier? If curl is missing from the default installation, then it may be a bug.
Yes, there are other tools than curl, for example 'wget', but it does not help much if curl is hard-coded into the
update script.

Hopefully [member=2]Jerry[/member] sees this post
Reply
#3
It won't be us. It will be another program you've installed at some point. Otherwise we'd be inundated with similar reports by now.

Sent from my Mi Max using Tapatalk

Reply
#4

(07-28-2018, 04:38 PM)kpanic link Wrote: Yes, there are other tools than curl, for example 'wget', but it does not help much if curl is hard-coded into the
update script.



A fallback function could be added to deal with this:


Code:
if which curl > /dev/null; then
    echo "use curl"
else
    echo "use wget"
fi


But the real issue is to find out why curl is being removed. It shouldn't be uninstalled just because... that's what's needs fixing.
https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#5
I don't really believe that the update cause this.. although it cause other things like grub now thinks I'm on Ubuntu  ;D
But I did install a lot of things recently as its a fairly new installation
I think at some point I needed a software (can't remember which now..) that was depends on other version of curl, and the installation pf that simply replaced the current version
Is it possible?
Reply
#6
May exchange:

Code:
curl -sk google.com
for:

Code:
wget --spider google.com

because I can't imagine wget ever getting removed.
Reply
#7
Not a bug. Software you install that is not in Lite software is the most likely cause. There is an awful lot out there that will break curl dependencies. Curl provides for software requiring any of the following protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp. So you can see that the possibility exists to break a lot of things. Unfortunately you cannot ignore curl dependency problems with some kinds of software, as some that depend on secure connections that are not using the latest version of curl will break others on your system that depend on the latest version. Reintstall the latest version of curl and then check for broken packages to find the offenders.

TC 
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
Reply
#8
Good points [member=5916]trinidad[/member] ,

To be safe, it's better not use unsupported software repositories.
One way to circumvent this though, is to compile curl from source under /usr/local
(This may be hard to do, since even though you may have all the dependency libraries installed,
you will also need all the corresponding header files).
Reply
#9
I have a suspect..
"Cycligent Git tool" can't run now because "version `CURL_OPENSSL_3' not found"
I guess when I installed it, it won't run without it so I've also install libcurl3 to make it run..
Reply
#10
Any way to use both libcurl3 and 4?
Like keep the default one intact and tell Cycligent to use other version..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)