Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Richard MQ on March 09, 2020, 05:48:41 PM

Title: [SOLVED] piCore-11: Problems with tce-load
Post by: Richard MQ on March 09, 2020, 05:48:41 PM
Hi - first post here though I've been using TinyCore on-and-off since the days of DSL.
Currently looking for a lightweight and headless OS for a Raspberry-Pi 3, piCore11.0 beta 1 seems a good start.
But I can't get tce-load to work:
Code: (bash) [Select]
tc@box:/mnt/mmcblk0p2/tce$ tce-load -wi file
Downloading: file.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: file.tcz.md5.txt: No such file or directory
Error on file.tcz
tc@box:/mnt/mmcbl

Also tried setting /opt/localmirrors to http://repo.tinycorelinux.net/11.x/armv7l/tcz but makes no difference

I'm sure I am missing something, any pointers much appreciated
Thanks
Richard




Title: Re: piCore-11: Problems with tce-load
Post by: Rich on March 09, 2020, 08:38:33 PM
Hi Richard MQ
Welcome to the forum. According to these links:
http://tinycorelinux.net/11.x/armv6/tcz/
http://tinycorelinux.net/11.x/armv7/tcz/
http://tinycorelinux.net/11.x/armv7l/tcz/
file.tcz  exists in all 3 repositories.

... Also tried setting /opt/localmirrors to http://repo.tinycorelinux.net/11.x/armv7l/tcz but makes no difference ...
I don't have a Raspberry Pi, but my understanding is that bmarkus made it a point to make PiCore look as much like Tinycore as possible.
There is an  /opt/tcemirror  file and it should contain:
Code: [Select]
http://repo.tinycorelinux.net/It tells the package manager which site to download from . The package manager handles filling in the rest of the URL.
Title: Re: piCore-11: Problems with tce-load
Post by: Richard MQ on March 10, 2020, 03:44:12 AM
Thanks Rich
Yes, file.tcz certainly exists, and I can see it if I use a browser on another machine to look at the repo.

As this is is piCore I don't have a graphical desktop so no AppBrowser available, instead I am using tce-load.
But tce-load is giving me a 404 when it tries to download this extension, or any other (same issue with "visudo" which I could certainly do with...)

I suspect I have not set the tce-load environment properly (equivalent to the mirror setup with AppBrowser) but I can't find any documentation on it?
Cheers
Richard
Title: Re: piCore-11: Problems with tce-load
Post by: Juanito on March 10, 2020, 05:29:00 AM
I don't see a problem on the server side - as a temporary fix, you can download with wget.
Title: Re: piCore-11: Problems with tce-load
Post by: Rich on March 10, 2020, 10:59:46 AM
Hi Richard MQ
... As this is is piCore I don't have a graphical desktop so no AppBrowser available, instead I am using tce-load. ...
AppBrowser  also uses  tce-load.

What do these commands return:
Code: [Select]
cat /opt/tcemirror
version
uname -r
Title: Re: piCore-11: Problems with tce-load
Post by: Richard MQ on March 10, 2020, 05:16:34 PM
Hi again Rich
Before and after a re-boot:
Code: (bash) [Select]
tc@box:~$ cat /opt/tcemirror
http://repo.tinycorelinux.net/11.x/armv7l/tcz/
tc@box:~$ version
11.0beta1a
tc@box:~$ uname -r
4.19.81-piCore-v7
tc@box:~$tce-load -wi aterm
Downloading: aterm.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: aterm.tcz.md5.txt: No such file or directory
Error on aterm.tcz
tc@box:~$ wget http://repo.tinycorelinux.net/11.x/armv7l/tcz/aterm.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
aterm.tcz            100% |*************************************************************************| 65536   0:00:00 ETA
tc@box:~$

This is baffling me!
Thanks again for looking at this...
R.
Title: Re: piCore-11: Problems with tce-load
Post by: Rich on March 10, 2020, 07:57:05 PM
Hi Richard MQ
Code: (bash) [Select]
tc@box:~$ cat /opt/tcemirror
http://repo.tinycorelinux.net/11.x/armv7l/tcz/
 ----- SNIP -----
That's wrong. Try this:
Code: [Select]
rm /opt/localmirrors
echo "http://repo.tinycorelinux.net/" > /opt/tcemirror

Now try using  tce-load  to get something else.
Title: Re: piCore-11: Problems with tce-load
Post by: Richard MQ on March 11, 2020, 02:57:38 PM
Wonderful - seems to work now as expected.

I am still confused as to why it didn't work out of the box though.

Many thanks
Richard
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 11, 2020, 04:30:16 PM
Hi Richard MQ
You are welcome. Thank you for confirming it worked. Marking the original post as solved.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 09:58:23 AM
Hello,

I have just installed tinycore from piCore-11.0beta1a.zip
I can ssh to it.
Version: 11.0beta1a / uname-r: 4.19.81-piCore-v7


However, I can't install any other packages than those that are in the http://tinycorelinux.net/11.x/armv7/tcz/
I would like to install nano, aplay, wifi and a few other packages

It looks like those packages are in the http://repo.tinycorelinux.net/9.x/armv7/tcz/
I have tried to force that repo with echo "http://repo.tinycorelinux.net/9.x/armv7/tcz/" > /opt/tcemirror
no way !

Please, tell me what am I missing ?

Jean
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 10:24:22 AM
Hi bricolodu13
... I have tried to force that repo with echo "http://repo.tinycorelinux.net/9.x/armv7/tcz/" > /opt/tcemirror
no way ! ...
No way indeed. The tce-load script will only go to the repository that matches the version and architecture you are running. The only
thing that should be in  /opt/tcemirror  is the base URL. The tce-load script reads that and appends the version and architecture itself.

If you want to try extensions from other repositories, you will need to fetch some other way. Be aware, any extensions (or dependencies)
that contain a kernel version number will not be compatible.

You can use  wget  like this:
Code: [Select]
wget http://repo.tinycorelinux.net/9.x/armv7/tcz/nano.tcz
You can place the URL in the address bar of your browser like this:
http://repo.tinycorelinux.net/9.x/armv7/tcz/nano.tcz

Those 2 methods require you to resolve dependencies yourself, and you must also download  .dep  files.


Use the script posted here:
http://forum.tinycorelinux.net/index.php/topic,23034.0.html
It will resolve and download depndencies. It will also fetch  .dep  and  .md5.txt  files.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 12:00:05 PM
Hello Rich,

Thank you for your fast reply.
However, there is another bug...

I did as per your example (well, I suppose)
BUT got an error...
Code: [Select]
tc@box:~/downloads$ ls
FetchExt.sh
tc@box:~/downloads$ ./FetchExt.sh nano
-sh: ./FetchExt.sh: not found
tc@box:~/downloads$
:-[

    [EDIT]: Changed italic text to code tags.  Rich
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 12:18:16 PM
Hi bricolodu13
I don't know why you would get that response if the file is actually there and the filename was typed correctly. It's the same response
you would get if you tried to execute a non-existent file:
Code: [Select]
tc@E310:~/info$ ./xyzzy
sh: ./xyzzy: not found
tc@E310:~/info$
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 12:21:25 PM
You are right and that's why I don't understand why it doesn't work ... :'(
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 12:31:01 PM
Hi bricolodu13
You said you are doing this through SSH. Maybe try logging out and back in again?
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: jazzbiker on March 23, 2020, 12:50:35 PM
Hi, Core guys!

Sorry for my 2 cents, but FetchExt.sh uses #!/bin/bash. Is bash installed?
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 01:01:54 PM
Hello Rich,

Thank you very much for trying to help.

However, no progress....

I even rebooted and did everything again (create a download directory, getting your file, making it executable, trying to exe, escape from the ssh session, launch a new session, ./FetchExt.sh nano) still no success.

And I'm almost sure it is executable as it is apearing in green after chmod.
Also, if accessing from WinSCP, the file poperties are correctly set as 0777

Hello jazzbiker
No bash is not installed !
The trick is that bash can't be installed for the very same reason that it is not availlable in the http://tinycorelinux.net/11.x/armv7/tcz/ repo...
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 01:02:16 PM
Hi jazzbiker
Sorry for my 2 cents, but FetchExt.sh uses #!/bin/bash. Is bash installed?
Yeah, that must be it. My local copy still uses  #!/bin/sh.  I forgot the posted version uses  #!/bin/bash.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 01:05:36 PM
Hi bricolodu13
... No bash is not installed !
The trick is that bash can't be installed for the very same reason that it is not availlable in the http://tinycorelinux.net/11.x/armv7/tcz/ repo...
Try changing  #!/bin/bash  to  #!/bin/sh  in the script.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: jazzbiker on March 23, 2020, 01:05:53 PM
In the case when shebanged binary is not found shell's error message is the same as in the case of missing original file, i've lost some hours before on such trap.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 01:17:58 PM
Hi,

I tryed to download bash from repo http://tinycorelinux.net/10.x/armv7/tcz/ with wget
then: tce-load -i bash.tcz
then i tried again :
Code: [Select]
./FetchExt.sh nano
http://repo.tinycorelinux.net/11.x/armv7/tcz/nano.tcz.tree  not found.
tc@box:~/download$ ./FetchExt.sh nano
http://repo.tinycorelinux.net/11.x/armv7/tcz/nano.tcz.tree  not found.
So making progress.
Maybe, I should just allways try wget and tce-load -i ?
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: jazzbiker on March 23, 2020, 01:18:14 PM
Frankly speaking such fake error message is very misleading and may be encountred  a bug.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 01:26:10 PM
Hi bricolodu13
Code: [Select]
./FetchExt.sh nano
http://repo.tinycorelinux.net/11.x/armv7/tcz/nano.tcz.tree  not found.
tc@box:~/download$ ./FetchExt.sh nano
http://repo.tinycorelinux.net/11.x/armv7/tcz/nano.tcz.tree  not found.
You need to change the version in the script. You are trying to download  nano  from the  11.x  repository.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 01:28:23 PM
Hi jazzbiker
Frankly speaking such fake error message is very misleading and may be encountred  a bug.
The message is not fake.  nano  doesn't exist in that  11.x  repository.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: jazzbiker on March 23, 2020, 01:30:59 PM
Hi jazzbiker
Frankly speaking such fake error message is very misleading and may be encountred  a bug.
The message is not fake.  nano  doesn't exist in that  11.x  repository.
Hi, Rich!
I was talking about ash message about missing shebang, sorry, haven't checked the thread before posting...
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 01:35:47 PM
Hello Rich,

OK
but, I thought that as I was using piCore-11.0beta1a.zip, I had to keep the same repo in your script.

So, If I select another repo, it is the same as wget repo xyz.tcz that repo and tce-load -i xyz.tcz or am I wrong ?

And, there is a risk that the package doen't work if it has not been produced for the piCore-11.0beta1a, or am I wrong ?
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: Rich on March 23, 2020, 01:48:53 PM
Hi bricolodu13
... but, I thought that as I was using piCore-11.0beta1a.zip, I had to keep the same repo in your script. ...
No. The purpose of the script is to allow someone to fetch extensions without regard to which Linux distro they are running. The
extensions/dependencies you need to avoid are the ones with a kernel version in their name. Your kernel version is 4.19.81, so if you
want ALSA modules you need to use the TC11 version which is  alsa-modules-4.19.81-piCore-v7.tcz.

Quote
So, If I select another repo, it is the same as wget repo xyz.tcz that repo and tce-load -i xyz.tcz or am I wrong ?
That's basically correct, except my script will resolve dependencies for you.

Quote
And, there is a risk that the package doen't work if it has not been produced for the piCore-11.0beta1a, or am I wrong ?
Thats always a risk when trying to use packages from a different version without recompiling, but trying it won't hurt anything.
Title: Re: [SOLVED] piCore-11: Problems with tce-load
Post by: bricolodu13 on March 23, 2020, 02:02:22 PM
Thank you