Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.





Cenzor wirtualnego świata
Chciałem sobie zbudować nieco bardziej aktualny obraz live na pena ale dostałem taki komunikat:
# lb build
[2013-10-20 22:53:29] lb build
P: Executing auto/build script.
[2013-10-20 22:53:29] lb build noauto
P: live-build 4.0~alpha27
P: Building config tree for a debian/jessie/i386 system
[2013-10-20 22:53:30] lb bootstrap
P: Setting up cleanup function
[2013-10-20 22:53:30] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2013-10-20 22:53:49] lb bootstrap_debootstrap
File "/usr/lib/live/build/bootstrap_debootstrap", line 46
print('E: config/build - no such file', file=sys.stderr)
^
SyntaxError: invalid syntax
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists...
Building dependency tree...
Reading state information...Jestem podpięty pod ten śmieszny system mailingowy debiana live i tam był podobny przypadek. Z tym, że koleś napisał:
The Python code "print('E: config/build - no such file', file=sys.stderr)"
works fine for me in python 3.3.2, but the default python on my system is
2.7.5, and it doesn't work there.
Cały bug tutaj: http://lists.debian.org/debian-live/2013/10/msg00051.html
Mam obecnie zainstalowane dwa pythony — 2.7 i 3.3.
root:/media/Server/live# dpkg -l | grep python2 ii libpython2.7:i386 2.7.5-8 i386 Shared Python runtime library (version 2.7) ii libpython2.7-minimal:i386 2.7.5-8 i386 Minimal subset of the Python language (version 2.7) ii libpython2.7-stdlib:i386 2.7.5-8 i386 Interactive high-level object-oriented language (standard library, version 2.7) ii python2.7 2.7.5-8 i386 Interactive high-level object-oriented language (version 2.7) ii python2.7-minimal 2.7.5-8 i386 Minimal subset of the Python language (version 2.7) root:/media/Server/live# dpkg -l | grep python3 ii libpython3-stdlib:i386 3.3.2-17 i386 interactive high-level object-oriented language (default python3 version) ii libpython3.3:i386 3.3.2-7 i386 Shared Python runtime library (version 3.3) ii libpython3.3-minimal:i386 3.3.2-7 i386 Minimal subset of the Python language (version 3.3) ii libpython3.3-stdlib:i386 3.3.2-7 i386 Interactive high-level object-oriented language (standard library, version 3.3) ii python3 3.3.2-17 i386 interactive high-level object-oriented language (default python3 version) ii python3-minimal 3.3.2-17 i386 minimal subset of the Python language (default python3 version) ii python3-uno 1:4.1.1-1+b1 i386 Python-UNO bridge ii python3.3 3.3.2-7 i386 Interactive high-level object-oriented language (version 3.3) ii python3.3-minimal 3.3.2-7 i386 Minimal subset of the Python language (version 3.3)
W /usr/bin mam:
# ls -al /usr/bin/python* lrwxrwxrwx 1 root root 9 Oct 20 22:33 /usr/bin/python -> python2.7* lrwxrwxrwx 1 root root 9 Sep 13 23:40 /usr/bin/python2 -> python2.7* -rwxr-xr-x 1 root root 3.1M Sep 17 21:32 /usr/bin/python2.7* lrwxrwxrwx 1 root root 9 Sep 23 21:44 /usr/bin/python3 -> python3.3* -rwxr-xr-x 2 root root 3.6M Sep 23 23:53 /usr/bin/python3.3* -rwxr-xr-x 2 root root 3.6M Sep 23 23:53 /usr/bin/python3.3m* lrwxrwxrwx 1 root root 10 Sep 23 21:44 /usr/bin/python3m -> python3.3m*
Zgodnie z tym co piszą na wiki archa: https://wiki.archlinux.org/index.php/python — miałem poczynić poniższe kroki by domyślnym pythonem w systemie był ten 3.3 zamiast 2.7:
# cd /root root:~# mkdir bin root:~# ln -s /usr/bin/python3.3 ~/bin/python root:~# tree /root/bin/ /root/bin/ └── python3.3 -> /usr/bin/python3.3 0 directories, 1 file root:~# export PATH=~/bin:$PATH root:~# echo $PATH /root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Myślałem, że to załatwi sprawę ale podczas próby zbudowania obrazu, dostałem znowu ten sam komunikat. Patrzę dalej na wiki archa i tam jest:
To check which python interpreter is being used by env, use the following command:
$ which python
No to wpisałem mu powyższe polecenie:
# which python /usr/bin/python
Czyli nie używa tego linku w /root/bin.
Na wiki archa był jeszcze python2-config ale tutaj u mnie nie ma żadnego python + config w /usr/bin/ .
Jako, że w /usr/bin/ python jest podlinkowany pod 2.7 , to usunąłem to dowiązanie i i podlinkowałem go bezpośrednio do 3.3:
# cd /usr/bin/ root:/usr/bin# rm python root:/usr/bin# ln -s python3.3 python root:/usr/bin# ls -al python* lrwxrwxrwx 1 root root 9 Oct 20 23:09 python -> python3.3* lrwxrwxrwx 1 root root 9 Sep 13 23:40 python2 -> python2.7* -rwxr-xr-x 1 root root 3.1M Sep 17 21:32 python2.7* lrwxrwxrwx 1 root root 9 Sep 23 21:44 python3 -> python3.3* -rwxr-xr-x 2 root root 3.6M Sep 23 23:53 python3.3* -rwxr-xr-x 2 root root 3.6M Sep 23 23:53 python3.3m* lrwxrwxrwx 1 root root 10 Sep 23 21:44 python3m -> python3.3m*
Ale to też nie pomaga, z tym, że teraz dostaje nieco inny błąd przy budowaniu obrazu:
# lb build
[2013-10-20 23:11:34] lb build
P: Executing auto/build script.
[2013-10-20 23:11:34] lb build noauto
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 28, in <module>
import lsb_release
ImportError: No module named 'lsb_release'
P: live-build 4.0~alpha27
P: Building config tree for a debian/jessie/i386 system
[2013-10-20 23:11:34] lb bootstrap
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 28, in <module>
import lsb_release
ImportError: No module named 'lsb_release'
P: Setting up cleanup function
[2013-10-20 23:11:34] lb bootstrap_cache restore
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 28, in <module>
import lsb_release
ImportError: No module named 'lsb_release'
P: Restoring bootstrap stage from cache...
[2013-10-20 23:11:48] lb bootstrap_debootstrap
Traceback (most recent call last):
File "/usr/lib/live/build/bootstrap_debootstrap", line 156, in <module>
main()
File "/usr/lib/live/build/bootstrap_debootstrap", line 36, in main
formatter_class = argparse.ArgumentDefaultsHelpFormatter
TypeError: __init__() got an unexpected keyword argument 'version'
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists...
Building dependency tree...
Reading state information...Wersja live-build jest z experimentala bo z tą z testinga były jakieś problemy.
# dpkg -l | grep live-build ii live-build 4.0~alpha27-1 all Live System Build Components
Ostatni obraz budowałem jakiś czas temu i wszystko było w porządku ale to dziwne, że tej osobie z listy mailingowej się buduje na pythonie 3.3, a u mnie nie chce. xD Jakieś pomysły?
Ostatnio edytowany przez morfik (2013-11-04 18:29:58)
Offline





Cenzor wirtualnego świata
Wygląda na to, że problem został poprawiony w live-build v. 4.0~alpha29-1 :
Changes:
live-build (4.0~alpha29-1) experimental; urgency=low
.
* Updating to standards version 3.9.5.
* Rewriting bootstrap_hooks in python.
* Making various things in bootstrap manpages more consistent.
* Also processing config/hooks/*.hook in bootstrap_hooks, if any.
* Adding lb_bootstrap_hooks manpage.
* Rewriting chroot_hooks in python.
* Adding lb_chroot_hooks manpage.
* Updating file suffixes of the internal default hooks.
* Automatically symlink hooks upon creation of the configuration tree.
* Updating configuration path in update-apt-file-cache.hook.chroot.
* Rewriting binary_hooks in python.
* Adding lb_binary_hooks manpage.
* Rewriting source_hooks in python.
* Adding lb_source_hooks manpage.
* Adding see also entries in hooks manpages.
* Moving python stubs to their own subdirectory within the source tree.
* Manually adding --version to argparse in python stub since python 3.3
dropped the version keyword.
* Replacing os.link calls for hooks with shutil.copy to properly
dereference symlinks in python stubs.Offline