LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slpkg syntax (https://www.linuxquestions.org/questions/slackware-14/slpkg-syntax-4175736129/)

however 04-17-2024 07:48 AM

slpkg syntax
 
Hello every one,

after I solved the previous thread with comments and reccommendations on using slpkg to compile and build sbopkgs and relative dependencies, I build and installed the slpkg-5.0.5 and I am trying to learn how to use it.

I can't find documentation anywhere; watched a cpl of vides on youtube but something is wrong. No matter what option i pass to slpkg (slplg _h, slpkg -H, slpkg -U, slpkg update.....) i get this message

Quote:

bash-5.2# slpkg update
Traceback (most recent call last):
File "/usr/sbin/slpkg", line 5, in <module>
from slpkg.main import main
File "/usr/lib/python3.11/site-packages/slpkg/main.py", line 19, in <module>
from slpkg.choose_packages import Choose
File "/usr/lib/python3.11/site-packages/slpkg/choose_packages.py", line 8, in <module>
from slpkg.dialog_box import DialogBox
File "/usr/lib/python3.11/site-packages/slpkg/dialog_box.py", line 5, in <module>
from dialog import Dialog
ModuleNotFoundError: No module named 'dialog'
bash-5.2#
what am i missing/doing wrong? What does it mean? how do I use slpkg (syntax)?

thanks

pghvlaans 04-17-2024 08:00 AM

Was python3-pythondialog rebuilt for 3.11?

ponce 04-17-2024 08:00 AM

you most probably haven't installed slpkg python dependencies: on current you need python3-pythondialog.

EDIT: too slow!

ZenwalkerGod 04-17-2024 08:16 AM

That error happened to me.

What i did was

Quote:

pip install slpkg

however 04-17-2024 08:23 AM

I hadn't. but now:
Quote:

Package python3-pythondialog-3.5.3-x86_64-1_SBo.tgz installed.
and
Quote:

Package python3-build-1.2.1-x86_64-1_SBo.tgz installed.
but when I run slpkg update, i still get
Quote:

bash-5.2# slpkg update
Traceback (most recent call last):
File "/usr/sbin/slpkg", line 5, in <module>
from slpkg.main import main
File "/usr/lib/python3.11/site-packages/slpkg/main.py", line 19, in <module>
from slpkg.choose_packages import Choose
File "/usr/lib/python3.11/site-packages/slpkg/choose_packages.py", line 8, in <module>
from slpkg.dialog_box import DialogBox
File "/usr/lib/python3.11/site-packages/slpkg/dialog_box.py", line 12, in <module>
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib64/python3.11/locale.py", line 627, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
bash-5.2#

however 04-17-2024 08:29 AM

Quote:

Originally Posted by ZenwalkerGod (Post 6496612)
That error happened to me.

What i did was

something happened but the outcome didn't change

Quote:

bash-5.2$ pip install slpkg
Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/lib64/python3.11/site-packages/gpg-1.23.2-py3.11-linux-x86_64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/lib/python3.11/site-packages/cupshelpers-1.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/lib/python3.11/site-packages/lensfun-0.3.4-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Requirement already satisfied: slpkg in /usr/lib/python3.11/site-packages (5.0.5)
Requirement already satisfied: pythondialog>=3.5.3 in /usr/lib/python3.11/site-packages (from slpkg) (3.5.3)
bash-5.2$ slpkg update
bash: slpkg: command not found
bash-5.2$ su
Password:
bash-5.2# slpkg update
Traceback (most recent call last):
File "/usr/sbin/slpkg", line 5, in <module>
from slpkg.main import main
File "/usr/lib/python3.11/site-packages/slpkg/main.py", line 19, in <module>
from slpkg.choose_packages import Choose
File "/usr/lib/python3.11/site-packages/slpkg/choose_packages.py", line 8, in <module>
from slpkg.dialog_box import DialogBox
File "/usr/lib/python3.11/site-packages/slpkg/dialog_box.py", line 12, in <module>
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib64/python3.11/locale.py", line 627, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
bash-5.2#

ponce 04-17-2024 08:35 AM

Quote:

Originally Posted by however (Post 6496613)
I hadn't. but now:

and

but when I run slpkg update, i still get

probably you have issues with your locale settings, see this topic
https://www.linuxquestions.org/quest...ue-4175735100/

however 04-17-2024 08:50 AM

Quote:

Originally Posted by ponce (Post 6496618)
probably you have issues with your locale settings, see this topic
https://www.linuxquestions.org/quest...ue-4175735100/

It seems that I don't! i followed the threat that you linked and all the outputs are correct, including the 'locale' and '/etc/profile.d/lang.sh'

ponce 04-17-2024 08:59 AM

what happens if you, from the same shell where you have the slpkg error, enter these three lines
Code:

LC_ALL=
LANG=en_US.utf8
slpkg update

?
does slpkg work then?

however 04-17-2024 09:06 AM

Quote:

Originally Posted by ponce (Post 6496628)
what happens if you, from the same shell where you have the slpkg error, enter these three lines
Code:

LC_ALL=
LANG=en_US.utf8
slpkg update

?
does slpkg work then?

sadly, it doesn't!
Quote:

bash-5.2# LC_ALL=
LANG=en_US.utf8
slpkg update
Traceback (most recent call last):
File "/usr/sbin/slpkg", line 5, in <module>
from slpkg.main import main
File "/usr/lib/python3.11/site-packages/slpkg/main.py", line 19, in <module>
from slpkg.choose_packages import Choose
File "/usr/lib/python3.11/site-packages/slpkg/choose_packages.py", line 8, in <module>
from slpkg.dialog_box import DialogBox
File "/usr/lib/python3.11/site-packages/slpkg/dialog_box.py", line 12, in <module>
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib64/python3.11/locale.py", line 627, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
bash-5.2#
p.s.: the language was already set to 'en_US.utf8'

ponce 04-17-2024 09:36 AM

what does these two commands (from the same shell) say
Code:

set | grep LANG
Code:

set | grep LC

however 04-17-2024 11:40 AM

Quote:

Originally Posted by ponce (Post 6496644)
what does these two commands (from the same shell) say
Code:

set | grep LANG

bash-5.2# set | grep LANG
LANG=en_US.utf8
LANGUAGE=
bash-5.2#

Quote:

Code:

set | grep LC

bash-5.2# set | grep LC
LC_ALL=
LC_COLLATE=C
LC_MONETARY=en_MT.UTF-8
MAILCHECK=60
bash-5.2#


Thanks for helping.

Petri Kaukasoina 04-17-2024 12:01 PM

Quote:

Originally Posted by however (Post 6496672)
LC_MONETARY=en_MT.UTF-8

There is no such locale: en_MT.UTF-8. (There is mt_MT.utf8).

ponce 04-17-2024 12:02 PM

^--that

Petri Kaukasoina 04-17-2024 12:05 PM

Code:

$ LC_MONETARY=en_MT.UTF-8 python
Python 3.11.9 (main, Apr  2 2024, 13:43:44) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.11/locale.py", line 627, in setlocale
    return _setlocale(category, locale)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
>>>



All times are GMT -5. The time now is 05:59 AM.