Linux Lite Forums
A fix to a probably a bug? "Linux Lite cannot check for Updates" - Printable Version

+- Linux Lite Forums (https://www.freecinema2022.gq/forums)
+-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5)
+--- Forum: Installing Software (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=18)
+--- Thread: A fix to a probably a bug? "Linux Lite cannot check for Updates" (/showthread.php?tid=5502)

Pages: 1 2


A fix to a probably a bug? "Linux Lite cannot check for Updates" - Roy - 07-28-2018

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'?


Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - kpanic - 07-28-2018

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



Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - Valtam - 07-29-2018

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




Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - ralphy - 07-29-2018


(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.


Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - Roy - 07-30-2018

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?


Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - Valtam - 07-30-2018

May exchange:

Code:
curl -sk google.com
for:

Code:
wget --spider google.com

because I can't imagine wget ever getting removed.


Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - trinidad - 07-30-2018

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 


Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - kpanic - 07-31-2018

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).



Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - Roy - 07-31-2018

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..



Re: A fix to a probably a bug? "Linux Lite cannot check for Updates" - Roy - 08-06-2018

Any way to use both libcurl3 and 4?
Like keep the default one intact and tell Cycligent to use other version..