1/1
Linux設定メモ
2018/10/23
■Linux設定メモ
ホームディレクトリのフォルダ名を日本語から英語に変更する
$ LANG=C xdg-user-dirs-gtk-update
nautilus-open-terminal
フォルダ内右クリックで[端末の中に開く]
cannot restore segment prot after reloc permission denied
SELinuxのライブラリに対するセキュリティ属性が適切に設定されていない……lightflowPM.soなどのセキュリティ属性を変更する。
rootユーザで
chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t xxx.so
バッテリー確認
$ upower -d
実行形式
$ chmod -R 755 simplescene*
フォルダ削除 一つ上の場所で
# sudo rm -rf gcc-2.95/
Virtualbox dvd-r読み書き用に元ユーザを参加させる
$ sudo gpasswd -a mac vboxusers
フォルダのコピー
$ cp -r gcc-2.95 ~/Documents/
$ sudo cp -r gcc-2.95 /usr/local
Linuxバージョン確認
$ cat /proc/version
/lib/x86_64-linux-gnu/libc.so.6
削除
sudo rpm -e VirtualBox-5.2-5.2.18_124319_fedora26-1.x86_64
インストール
sudo rpm -ivh VirtualBox-5.2-5.2.20_125813_fedora26-1.x86_64.rpm
DVD書込み
growisofs -Z /dev/cdrom -R -J /home/mac/Downloads/isodata/
ありがとうございます。
最初の書込み(R/RW共通),上書きの場合(RWのみ)
growisofs -Z /dev/dvd -R -J ファイル and/or ディレクトリ(群)
追加書込みの場合(R/RW共通)
growisofs -M /dev/dvd -R -J ファイル and/or ディレクトリ(群)
gcc
http://ftp.tsukuba.wide.ad.jp/software/gcc/
glibc確認、下記のコマンドを実行する。
ls -l /lib/libc-*
dnf -v grouplist
http://ftp.jaist.ac.jp/pub/Linux/
Macでisoイメージの作成。
ディスクユーティリティーのコマンドは以下の通り。 isoにしたいディレクトリをDIRの部分に指定する。
hdiutil makehybrid -iso -joliet -o sample.iso DIR
Fedora8 virtualbox guestaddインストール後、起動しない。
unable to load Selinux カーネルパニック 起動しない。
シングルモード起動時 selinux=0 singleで起動。
/etc/selinux/configを編集。
SELINUX=disabledに変更
再起動、guest addition toolが動きました。ありがとうございます。
ロック画面のまま、ログインウィンドウが表示されない場合は、
Ctrl + Alt + F1 でコマンドラインを表示
■共有フォルダ設定、VirtualboxのゲストOS上で
# gpasswd --add {ユーザ名} vboxsf
ユーザをvboxsfグループに追加します。
■VirtualBox共有フォルダ
ubuntu系
sudo nano /etc/modules
cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
vboxsf
--------------
ゲストOSに$mkdir <マウントポイント名>
フォルダを作る。
$sudo mount.vboxsf <設定したホストOSでの共有ファイル名> /home/<ログインに使う名前>/<マウントポイント名>
■その他
tkinter確認
$ python -m Tkinter
iv install
$ sudo apt install openimageio-tools
■論理cpu数 確認
$ grep processor /proc/cpuinfo | wc -l
##ISO ファイル(CDイメージ)を作成する方法##
ファイルやフォルダからisoファイルを作成する場合
# mkisofs -r -J -V <ラベル> -o
<ディレクトリ名>
(例)# mkisofs -r -J -V "Mydata" -o imagecd.iso /home/hoge/
To switch python2 under Linux Fedora 32
How to change default Python version on Linux/Fedora 28
under Fedora32
# alternatives --install /usr/bin/python python /usr/bin/python3.7 2
# alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo alternatives --config python
2 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
* 1 /usr/bin/python3.7
+ 2 /usr/bin/python2.7
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:1
$ alternatives --list | grep -i python
python manual /usr/bin/python3.7
------------------------------------------------------
setup.pyを用いてインストールしたモジュールのアンインストール方法
python setup.py install --record install.txt
sudo cat inst.txt | sudo xargs rm -rf
------------------------------------------------------
to burn ISO image example:
samp:出力例
$ mkisofs -r -J -V "airCD" -o air_image.iso /run/media/mac/A12C-3EDA/
------------------------------------------------------
to edit gnome boxes example:
$ cd .config
$ cd libvirt/qemu/
samp:出力例
$ virsh edit centos6.8
-----------------------------------------------------
glibc version check
$ /lib/x86_64-linux-gnu/libc.so.6
or
# rpm -q glibc
# yum list installed | grep glibc
Thank You.
Sitex Air14 has been installed under CentOS 6.10
I installed CentOS6.10 64bit on virtualbox.
I have sitex air 14 for linux.
--------------------------------------------------
Sitex air renderer has airshow.
airshow is a 32bit application.
it includes the old 1.2 libraries for GTK and GDK.
it needs gtk1.2.
airshow works.
---------------------------------------------
$ airshow
bash: /home/mak/air/bin/airshow: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
# yum install ld-linux.so.2
Downloading Packages:
(1/2): glibc-2.12-1.212.el6_10.3.i686.rpm | 4.4 MB 00:01
(2/2): nss-softokn-freebl-3.44.0-6.el6_10.i686.rpm | 201 kB 00:00
Installed:
glibc.i686 0:2.12-1.212.el6_10.3
Dependency Installed:
nss-softokn-freebl.i686 0:3.44.0-6.el6_10
$ airshow
airshow: error while loading shared libraries: libglib-1.2.so.0: cannot open shared object file: No such file or directory
libglib-1.2.so.0
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/g/glib-1.2.10-33.el6.i686.rpm
# rpm -ivh glib-1.2.10-33.el6.i686.rpm
warning: glib-1.2.10-33.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:glib ########################################### [100%]
$ airshow simple.tif
airshow: error while loading shared libraries: libgdk-1.2.so.0: cannot open shared object file: No such file or directory
https://download-ib01.fedoraproject.org/pub/epel/6/i386/Packages/g/gtk+-1.2.10-70.el6.i686.rpm
# rpm -ivh gtk+-1.2.10-70.el6.i686.rpm
warning: gtk+-1.2.10-70.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
error: Failed dependencies:
libX11.so.6 is needed by gtk+-1:1.2.10-70.el6.i686
libXext.so.6 is needed by gtk+-1:1.2.10-70.el6.i686
libXi.so.6 is needed by gtk+-1:1.2.10-70.el6.i686
# yum install libX11-1.6.4-3.el6.i686
Downloading Packages:
(1/3): libX11-1.6.4-3.el6.i686.rpm | 594 kB 00:00
(2/3): libXau-1.0.6-4.el6.i686.rpm | 24 kB 00:00
(3/3): libxcb-1.12-4.el6.i686.rpm
# yum install libXext-1.3.3-1.el6.i686
# yum install libXi-1.7.8-1.el6.i686
# rpm -ivh gtk+-1.2.10-70.el6.i686.rpm
warning: gtk+-1.2.10-70.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:gtk+ ########################################### [100%]
$ airshow simple.tif
airshow: error while loading shared libraries: libgdk_pixbuf.so.2: cannot open shared object file: No such file or directory
# yum install gdk-pixbuf2-2.24.1-6.el6_7.i686
Installed:
gdk-pixbuf2.i686 0:2.24.1-6.el6_7
Dependency Installed:
gamin.i686 0:0.1.10-9.el6 glib2.i686 0:2.28.8-10.el6
jasper-libs.i686 0:1.900.1-22.el6 libgcc.i686 0:4.4.7-23.el6
libjpeg-turbo.i686 0:1.2.1-3.el6_5 libpng.i686 2:1.2.49-2.el6_7
libselinux.i686 0:2.0.94-7.el6 libstdc++.i686 0:4.4.7-23.el6
libtiff.i686 0:3.9.4-21.el6_8 zlib.i686 0:1.2.3-29.el6
$ airshow simple.tif
airshow: error while loading shared libraries: libgdk_pixbuf.so.2: cannot open shared object file: No such file or directory
https://li.nux.ro/download/nux/dextop/el6/i386/gdk-pixbuf-0.22.0-38.el6.nux.i686.rpm
# rpm -Uvh gdk-pixbuf-0.22.0-38.el6.nux.i686.rpm
warning: gdk-pixbuf-0.22.0-38.el6.nux.i686.rpm: Header V4 RSA/SHA1 Signature, key ID 85c6cd8a: NOKEY
Preparing... ########################################### [100%]
1:gdk-pixbuf ########################################### [100%]
$ airshow simple.tif
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
Gtk-CRITICAL **: file gtkobject.c: line 1179 (gtk_object_unref): assertion `object->ref_count > 0' failed.
The error message comes from the user interface library used by those programs.
airshow works.
Thank you for your support.
vshade works.
installed fonts.
# yum provides xorg-x11-fonts-75dpi
# yum install xorg-x11-fonts-75dpi-7.2-11.el6.noarch
# yum provides xorg-x11-fonts-ISO8859-1-75dpi
# yum install xorg-x11-fonts-ISO8859-1-75dpi-7.2-11.el6.noarch
$ vshade
It works.
following are error messages.
Gtk-CRITICAL **: file gtkwidget.c: line 3357 (gtk_widget_set_parent): assertion `widget->parent == NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 3357 (gtk_widget_set_parent): assertion `widget->parent == NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 3357 (gtk_widget_set_parent): assertion `widget->parent == NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 3357 (gtk_widget_set_parent): assertion `widget->parent == NULL' failed.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kbuildsycoca4 running...
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::font: Painter not active
QPainter::setFont: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::worldTransform: Painter not active
Gtk-CRITICAL **: file gtkwidget.c: line 1388 (gtk_widget_destroy): assertion `GTK_IS_WIDGET (widget)' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 1388 (gtk_widget_destroy): assertion `GTK_IS_WIDGET (widget)' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 1388 (gtk_widget_destroy): assertion `GTK_IS_WIDGET (widget)' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 1388 (gtk_widget_destroy): assertion `GTK_IS_WIDGET (widget)' failed.
Gtk-CRITICAL **: file gtkobject.c: line 1179 (gtk_object_unref): assertion `object->ref_count > 0' failed.
The error message comes from the user interface library used by those programs.
vshade works.
Thank you for your support.
Python cgkit2.0 has been installed under CentOS6.10
# yum groupinstall "Development Tools"
# uname -a
Linux localhost.localdomain 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
python-devel
# yum install python-devel
freeglut
# yum install freeglut
# yum install freeglut-devel
Installed:
freeglut-devel.x86_64 0:2.6.0-1.el6
Dependency Installed:
libX11-devel.x86_64 0:1.6.4-3.el6
libXau-devel.x86_64 0:1.0.6-4.el6
libXdamage-devel.x86_64 0:1.1.3-4.el6
libXext-devel.x86_64 0:1.3.3-1.el6
libXfixes-devel.x86_64 0:5.0.3-1.el6
libXxf86vm-devel.x86_64 0:1.1.3-2.1.el6
libdrm-devel.x86_64 0:2.4.65-2.el6
libxcb-devel.x86_64 0:1.12-4.el6
mesa-libGL-devel.x86_64 0:11.0.7-4.el6
mesa-libGLU-devel.x86_64 0:11.0.7-4.el6
xorg-x11-proto-devel.noarch 0:7.7-14.el6
PIL1.17, PyOpenGL, scons, ..etc..
# yum install python-imaging
# yum install PyOpenGL
# yum install scons
# yum install glibc-static
Installed:
glibc-static.x86_64 0:2.12-1.212.el6_10.3
# yum install compat-libstdc++-33-3.2.3-69.el6.x86_64
pygame
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/p/pygame-1.9.1-4.el6.x86_64.rpm
# rpm -Uvh pygame-1.9.1-4.el6.x86_64.rpm
warning: pygame-1.9.1-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
error: Failed dependencies:
libSDL_image-1.2.so.0()(64bit) is needed by pygame-1.9.1-4.el6.x86_64
libSDL_mixer-1.2.so.0()(64bit) is needed by pygame-1.9.1-4.el6.x86_64
libSDL_ttf-2.0.so.0()(64bit) is needed by pygame-1.9.1-4.el6.x86_64
libportmidi.so.0()(64bit) is needed by pygame-1.9.1-4.el6.x86_6
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/s/SDL_image-1.2.12-9.el6.x86_64.rpm
# rpm -Uvh SDL_image-1.2.12-9.el6.x86_64.rpm
warning: SDL_image-1.2.12-9.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:SDL_image ########################################### [100%]
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/s/SDL_mixer-1.2.12-1.el6.x86_64.rpm
# rpm -Uvh SDL_mixer-1.2.12-1.el6.x86_64.rpm
warning: SDL_mixer-1.2.12-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:SDL_mixer ########################################### [100%]
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/s/SDL_ttf-2.0.11-6.el6.x86_64.rpm
# rpm -Uvh SDL_ttf-2.0.11-6.el6.x86_64.rpm
warning: SDL_ttf-2.0.11-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:SDL_ttf ########################################### [100%]
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/p/portmidi-217-3.el6.x86_64.rpm
rpm -Uvh portmidi-217-3.el6.x86_64.rpm
warning: portmidi-217-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:portmidi ########################################### [100%]
# rpm -Uvh pygame-1.9.1-4.el6.x86_64.rpm
warning: pygame-1.9.1-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:pygame ########################################### [100%]
PyProtocols-0.9.3
# python setup.py --without-speedups install
boost-devel
# yum install boost-devel-1.41.0-28.el6.x86_64
Installed:
boost-devel.x86_64 0:1.41.0-28.el6
Dependency Installed:
boost.x86_64 0:1.41.0-28.el6
boost-date-time.x86_64 0:1.41.0-28.el6
boost-graph.x86_64 0:1.41.0-28.el6
boost-iostreams.x86_64 0:1.41.0-28.el6
boost-math.x86_64 0:1.41.0-28.el6
boost-python.x86_64 0:1.41.0-28.el6
boost-regex.x86_64 0:1.41.0-28.el6
boost-serialization.x86_64 0:1.41.0-28.el6
boost-signals.x86_64 0:1.41.0-28.el6
boost-test.x86_64 0:1.41.0-28.el6
boost-thread.x86_64 0:1.41.0-28.el6
boost-wave.x86_64 0:1.41.0-28.el6
ode ode-devel
not ode.i686 but ode.x86_64.
http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/ode-devel
ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/epel/5/x86_64/ode-0.11.1-4.el5.x86_64.rpm
ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/epel/5/x86_64/ode-devel-0.11.1-4.el5.x86_64.rpm
Pyrex
http://mirror.centos.org/centos/6/os/i386/Packages/Pyrex-0.9.8.4-4.1.el6.noarch.rpm
# rpm -Uvh Pyrex-0.9.8.4-4.1.el6.noarch.rpm
Preparing... ########################################### [100%]
1:Pyrex ########################################### [100%]
Download:PyODE
http://pyode.sourceforge.net/#download
# python setup.py build
# python setup.py install
Download:Pyserials
http://pypi.python.org/pypi/pyserial
pyserial-2.6.tar.gz
https://files.pythonhosted.org/packages/fb/93/e350757db177234e77037dbbbf8551c0a6e43b634f375590399fef920fde/pyserial-2.6.tar.gz
# python setup.py install
Download:cgkit
$ python checkenv.py
----------------------------------------------------------------------
Python 2.6.6 (r266:84292, Jun 20 2019, 14:14:55)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.6........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... missing
The Python bindings of the Open Dynamics Engine (ODE) are not installed.
You will not be able to use the ODEDynamics component to do rigid body
simulations. You can get PyODE at http://pyode.sourceforge.net/
PySerial...................... missing
PySerial is not installed. This module is only required for accessing
an Ascension Flock Of Bird motion tracker. You can get the module at
http://pyserial.sourceforge.net/
cgkit (base).................. missing
cgkit (C++ lib)............... failed
The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the boost_python runtime or OpenGL)
could not be found.
cgkit (all)................... failed
lib3ds lib3ds-devel
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/l/lib3ds-1.3.0-9.el6.x86_64.rpm
http://rpmfind.net/linux/RPM/dag/redhat/el6/x86_64/lib3ds-1.2.0-1.el6.rf.x86_64.html
-------------------------
https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/l/lib3ds-devel-1.3.0-9.el6.x86_64.rpm
-------------------------
# rpm -Uvh lib3ds-1.3.0-9.el6.x86_64.rpm
warning: lib3ds-1.3.0-9.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:lib3ds ########################################### [100%]
[root@localhost Downloads]# rpm -Uvh lib3ds-devel-1.3.0-9.el6.x86_64.rpm
warning: lib3ds-devel-1.3.0-9.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:lib3ds-devel ########################################### [100%]
config.cfg
config_template.cfg in cgkit2.0.0 folder
rename config.cfg
####### Libd3DS #######
LIB3DS_AVAILABLE = True
LIB3DS_PATH = r"/usr/lib64"
LIB3DS_LIBNAME = "lib3ds"
Error case1: cgkit 3ds import plugin
following are: build error
/usr/bin/ld: cannot find -llib3ds
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
g++ -pthread -shared build/temp.linux-x86_64-2.6/wrappers/py_wrapper.o build/temp.linux-x86_64-2.6/wrappers/py_noise.o build/temp.linux-x86_64-2.6/wrappers/py_vec3.o build/temp.linux-x86_64-2.6/wrappers/py_vec4.o build/temp.linux-x86_64-2.6/wrappers/py_mat3.o build/temp.linux-x86_64-2.6/wrappers/py_mat4.o build/temp.linux-x86_64-2.6/wrappers/py_quat.o build/temp.linux-x86_64-2.6/wrappers/py_slots1.o build/temp.linux-x86_64-2.6/wrappers/py_slots2.o build/temp.linux-x86_64-2.6/wrappers/py_slots3.o build/temp.linux-x86_64-2.6/wrappers/py_slots4.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslots1.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslots2.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslot_mat3.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslot_mat4.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslots4.o build/temp.linux-x86_64-2.6/wrappers/py_component.o build/temp.linux-x86_64-2.6/wrappers/py_boundingbox.o build/temp.linux-x86_64-2.6/wrappers/py_worldobject.o build/temp.linux-x86_64-2.6/wrappers/py_worldobject2.o build/temp.linux-x86_64-2.6/wrappers/py_worldobject3.o build/temp.linux-x86_64-2.6/wrappers/py_material.o build/temp.linux-x86_64-2.6/wrappers/py_glmaterial.o build/temp.linux-x86_64-2.6/wrappers/py_geoms1.o build/temp.linux-x86_64-2.6/wrappers/py_spheregeom.o build/temp.linux-x86_64-2.6/wrappers/py_ccylindergeom.o build/temp.linux-x86_64-2.6/wrappers/py_torusgeom.o build/temp.linux-x86_64-2.6/wrappers/py_boxgeom.o build/temp.linux-x86_64-2.6/wrappers/py_planegeom.o build/temp.linux-x86_64-2.6/wrappers/py_trimeshgeom.o build/temp.linux-x86_64-2.6/wrappers/py_polyhedrongeom.o build/temp.linux-x86_64-2.6/wrappers/py_drawgeom.o build/temp.linux-x86_64-2.6/wrappers/py_lightsource.o build/temp.linux-x86_64-2.6/wrappers/py_glpointlight.o build/temp.linux-x86_64-2.6/wrappers/py_glspotlight.o build/temp.linux-x86_64-2.6/wrappers/py_gldistantlight.o build/temp.linux-x86_64-2.6/wrappers/py_glrenderer.o build/temp.linux-x86_64-2.6/wrappers/py_massproperties.o build/temp.linux-x86_64-2.6/wrappers/rply/rply/rply.o build/temp.linux-x86_64-2.6/wrappers/rply/py_rply_read.o build/temp.linux-x86_64-2.6/wrappers/rply/py_rply_write.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/common_funcs.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/nodedata.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/light.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/mesh.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/material.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/lib3ds.o -Lsupportlib/lib -L/usr/lib64 -lboost_python -lcore /usr/lib64/lib3ds.a -lGL -lGLU -lpython2.6 -o build/lib.linux-x86_64-2.6/cgkit/_core.so
/usr/bin/ld: /usr/lib64/lib3ds.a(file.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/lib3ds.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
Error case2: cgkit 3ds import plugin
####### Libd3DS #######
LIB3DS_AVAILABLE = True
LIB3DS_PATH = r"/usr/lib64"
LIB3DS_LIBNAME = "lib3ds"
# ldconfig
lib64]# ls -l lib3ds*
lrwxrwxrwx. 1 root root 17 May 1 20:14 lib3ds-1.so.3 -> lib3ds-1.so.3.0.0
-rwxr-xr-x. 1 root root 123688 Sep 15 2010 lib3ds-1.so.3.0.0
lrwxrwxrwx. 1 root root 17 May 1 20:14 lib3ds.so -> lib3ds-1.so.3.0.0
# ldconfig -p | grep lib3ds
lib3ds-1.so.3 (libc6,x86-64) => /usr/lib64/lib3ds-1.so.3
# ln -s /usr/lib64/lib3ds-1.so.3 /usr/lib64/lib3ds.so
[root@localhost cgkit-2.0.0]# ldconfig -p | grep lib3ds
lib3ds-1.so.3 (libc6,x86-64) => /usr/lib64/lib3ds-1.so.3
[root@localhost cgkit-2.0.0]# ln -s /usr/lib64/lib3ds-1.so.3 /usr/lib64/lib3ds.so
ln: creating symbolic link `/usr/lib64/lib3ds.so': File exists
cgkit 3ds import plugin
changed config.cfg
---------------------------
####### Libd3DS #######
LIB3DS_AVAILABLE = True
LIB3DS_PATH = r"/usr/lib64/lib3ds.so"
#LIB3DS_LIBNAME = "3ds"
----------------------------
# python setup.py build
g++ -pthread -shared build/temp.linux-x86_64-2.6/wrappers/py_wrapper.o build/temp.linux-x86_64-2.6/wrappers/py_noise.o build/temp.linux-x86_64-2.6/wrappers/py_vec3.o build/temp.linux-x86_64-2.6/wrappers/py_vec4.o build/temp.linux-x86_64-2.6/wrappers/py_mat3.o build/temp.linux-x86_64-2.6/wrappers/py_mat4.o build/temp.linux-x86_64-2.6/wrappers/py_quat.o build/temp.linux-x86_64-2.6/wrappers/py_slots1.o build/temp.linux-x86_64-2.6/wrappers/py_slots2.o build/temp.linux-x86_64-2.6/wrappers/py_slots3.o build/temp.linux-x86_64-2.6/wrappers/py_slots4.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslots1.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslots2.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslot_mat3.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslot_mat4.o build/temp.linux-x86_64-2.6/wrappers/py_arrayslots4.o build/temp.linux-x86_64-2.6/wrappers/py_component.o build/temp.linux-x86_64-2.6/wrappers/py_boundingbox.o build/temp.linux-x86_64-2.6/wrappers/py_worldobject.o build/temp.linux-x86_64-2.6/wrappers/py_worldobject2.o build/temp.linux-x86_64-2.6/wrappers/py_worldobject3.o build/temp.linux-x86_64-2.6/wrappers/py_material.o build/temp.linux-x86_64-2.6/wrappers/py_glmaterial.o build/temp.linux-x86_64-2.6/wrappers/py_geoms1.o build/temp.linux-x86_64-2.6/wrappers/py_spheregeom.o build/temp.linux-x86_64-2.6/wrappers/py_ccylindergeom.o build/temp.linux-x86_64-2.6/wrappers/py_torusgeom.o build/temp.linux-x86_64-2.6/wrappers/py_boxgeom.o build/temp.linux-x86_64-2.6/wrappers/py_planegeom.o build/temp.linux-x86_64-2.6/wrappers/py_trimeshgeom.o build/temp.linux-x86_64-2.6/wrappers/py_polyhedrongeom.o build/temp.linux-x86_64-2.6/wrappers/py_drawgeom.o build/temp.linux-x86_64-2.6/wrappers/py_lightsource.o build/temp.linux-x86_64-2.6/wrappers/py_glpointlight.o build/temp.linux-x86_64-2.6/wrappers/py_glspotlight.o build/temp.linux-x86_64-2.6/wrappers/py_gldistantlight.o build/temp.linux-x86_64-2.6/wrappers/py_glrenderer.o build/temp.linux-x86_64-2.6/wrappers/py_massproperties.o build/temp.linux-x86_64-2.6/wrappers/rply/rply/rply.o build/temp.linux-x86_64-2.6/wrappers/rply/py_rply_read.o build/temp.linux-x86_64-2.6/wrappers/rply/py_rply_write.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/common_funcs.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/nodedata.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/light.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/mesh.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/material.o build/temp.linux-x86_64-2.6/wrappers/lib3ds/lib3ds.o -Lsupportlib/lib -L/usr/lib64 -lboost_python -lcore -l3ds -lGL -lGLU -lpython2.6 -o build/lib.linux-x86_64-2.6/cgkit/_core.so
# python setup.py install
[@localhost utilities]$ python checkenv.py
----------------------------------------------------------------------
Python 2.6.6 (r266:84292, Jun 20 2019, 14:14:55)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.6........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (Apr 30 2020)
cgkit (C++ lib)............... OK
cgkit (all)................... OK
viewer.py bunny.3ds
$ render.py -rair bunny.3ds
Fedora 32 Black screen with no cursor after install or upgrade
Fedora 32 upgrade now.
after reboot.
but black screen.
for a while.
My laptop let power off.
power on.
GRUB bootloader to appear (the boot selection screen).
press the “e” key to edit.
Scroll down
The line should finally end with “rhgb” and “quiet”.
Remove “rhgb” and “quiet”, and then add “nomodeset=0”
Press “CTRL+x” to boot the system.
The system should now boot.
Installing starts.
Thank you.
https://www.stephenwagner.com/2018/08/25/fedora-core-black-screen-with-cursor-after-install-upgrade/
Fedora 32 boost python & python cgkit install under Fedora 32.
How to change default Python version on Linux/Fedora 32
under Fedora32
# alternatives --install /usr/bin/python python /usr/bin/python3.8 2
# alternatives --install /usr/bin/python python /usr/bin/python2.7 1
$ sudo alternatives --config python
2 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
* 1 /usr/bin/python3.8
+ 2 /usr/bin/python2.7
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:1
$ alternatives --list | grep -i python
python manual /usr/bin/python3.8
boost python
can not find -lboost_python
-----------------------------------------------
Install boost
Install boost-devel
Install python2-devel
Install python3-devel
Install boost-python2
Install boost-python3
-----------------------------------------------
-Lsupportlib/lib -L/usr/lib64 -lboost_python -lcore -l3ds -lGL -lGLU -lpython2.7 -o build/lib.linux-x86_64-2.7/cgkit/_core.so
/usr/bin/ld: -lboost_python が見つかりません
collect2: エラー: ld はステータス 1 で終了しました
$ sudo ldconfig -p | grep boost_python3
libboost_python38.so.1.69.0 (libc6,x86-64) => /lib64/libboost_python38.so.1.69.0
$ sudo ldconfig -p | grep boost_python2
libboost_python27.so.1.69.0 (libc6,x86-64) => /lib64/libboost_python27.so.1.69.0
/usr/lib64
$ sudo ln -s libboost_python27.so.1.69.0 libboost_python2.so
/usr/lib64 $ sudo ldconfig
-lboost_python2 is OK.
Boost.Python の機能をざっと紹介してみる
http://moriyoshi.hatenablog.com/entry/20091214/1260779899
export CPLUS_INCLUDE_PATH=/usr/include/python2.7
$ python
Python 2.7.18 (default, Apr 20 2020, 00:00:00)
[GCC 10.0.1 20200328 (Red Hat 10.0.1-0.11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ export CPLUS_INCLUDE_PATH=/usr/include/python2.7
$ g++ -I`python -c 'from distutils.sysconfig import *; get_python_inc()'` -DPIC -shared -fPIC -o basic.so basic.cpp -lboost_python-py27
/usr/bin/ld: -lboost_python-py27 が見つかりません
collect2: エラー: ld はステータス 1 で終了しました
g++ -I`python -c 'from distutils.sysconfig import *; get_python_inc()'` -DPIC -shared -fPIC -o basic.so basic.cpp -lboost_python2
python cgkit install under fedora 32
switch python2.7
$ sudo alternatives --config python
[sudo] のパスワード:
3 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
1 /usr/bin/python3.7
+ 2 /usr/bin/python2.7
* 3 /usr/bin/python3.8
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:
$ alternatives --list | grep -i python
python manual /usr/bin/python2.7
------------------------------------------------
/usr/lib64
$ sudo ln -s libboost_python27.so.1.69.0 libboost_python2.so
------------------------------------------------
python cgkit folder config.cfg
######################################################################
# Boost.Python settings
######################################################################
# Name of the Boost.Python library to link with
BOOST_LIB = "boost_python2"
######################################################################
# Optional libraries
######################################################################
Install lib3ds-devel
####### Libd3DS #######
LIB3DS_AVAILABLE = True
LIB3DS_PATH = r"/lib64/"
LIB3DS_LIBNAME = "3ds"
------------------------------------------------
$ sudo python setup.py build
.....
.....
.....
$ sudo python setup.py install
python cgkit is OK.
alternatives --remove python
$ sudo alternatives --config python
[sudo] のパスワード:
3 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
1 /usr/bin/python3.7
+ 2 /usr/bin/python2.7
* 3 /usr/bin/python3.8
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:
$ sudo alternatives --remove python /usr/bin/python3.7
$ sudo alternatives --config python
2 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
* 1 /usr/bin/python3.8
+ 2 /usr/bin/python2.7
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:
-----------------------------------------------------------
$ sudo alternatives --config python
2 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
* 1 /usr/bin/python3.8
+ 2 /usr/bin/python2.7
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:1
~]$ python
Python 3.8.2 (default, Feb 28 2020, 00:00:00)
[GCC 10.0.1 20200216 (Red Hat 10.0.1-0.8)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
~]$ sudo alternatives --config python
2 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
*+ 1 /usr/bin/python3.8
2 /usr/bin/python2.7
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:2
~]$ python
Python 2.7.18 (default, Apr 20 2020, 00:00:00)
[GCC 10.0.1 20200328 (Red Hat 10.0.1-0.11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
Thank you.
wine-3.6 (Ubuntu 3.6-1) install under Linux Lite. 2020/5
Wineのインストール
Linux Lite4.2 64bitにwineをいれました。
Windows10では動かない、Lightflowやmetalight2が動くか確認した見ました。インストールは64bitですが、32bitのwinアプリが動きました。
■参考
下記を参考にしました。ありがとうございます。
ガラクタプログラム
■設定
Linux Liteを,virtualbox上で動かしています。
$ apt-file search winehq
たくさん、出てきます。
$ sudo apt-get update
$ sudo apt install wine-development
$ wine
Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit
$ wine --version
wine-3.6 (Ubuntu 3.6-1)
■設定方法
まずwinecfgを起動します。しばらく時間がかかる。
$ winecfg
$ wine notepad メモ帳
$ wine regedit レジストリ・エディタ
■Winetricksを使って必要なライブラリやフォントなどをインストールします。
$ sudo apt install winetricks
$ winetricks
Direct3D9をいれてみました。
■VirtualBox共有フォルダ
ubuntu系
sudo nano /etc/modules
cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
vboxsf
--------------
ゲストOSに$mkdir <マウントポイント名>
フォルダを作る。
$sudo mount.vboxsf <設定したホストOSでの共有ファイル名> /home/<ログインに使う名前>/<マウントポイント名>
例: ~$ sudo mount.vboxsf kyouyu /home/mac/litekyouyu/
■バージョン確認
$ cat .wine/system.reg | grep -m 1 '#arch' | cut -d '=' -f2
win64
■古いプログラムが起動する。ありがとうございます。
インストーラーも、起動してCドライブに入ります。Python1.5.2をインストールしました。
$ wine py152.exe
Python1.5.2 for windows のインストール。
$ wine cmd
コマンドプロンプト
$ wine explorer
Windows のコマンドプロンプトからエクスプローラを開く
Windows のファイルマネージャーはエクスプローラ (explorer.exe)
コピー、貼り付けがゆっくりですが、できました。
■Wine上の環境変数の設定
「
Wine上の環境変数の扱いについて(後半)」を参考にしました。
$ wine regedit
を使います。
ユーザごとの環境変数はHKEY_CURRENT_USER/Environment、(仮想Windows環境における)システム環境変数はHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment以下に「[環境変数名]=[値]」形式の文字列としてレジストリ項目が存在する場合にこれを読み込む形となっている。
保存し、再起動して、確認、PATHが追加されました。
c:\Lightflow\PM\Examples>path
PATH=C:\windows\system32;C:\windows;C:\windows\system32\wbem;C:\Program Files (x86)\Python
これで、64bit環境で、windows 32bitプログラム、Lightflow Rendering Toolが動きました。
Lightflowのインストールは
こちら。
>python mechanic.py
Lightflow Rendering Tools
Copyright (c) 1995-2000 by Jacopo Pantaleoni. All rights reserved
Pinhole Camera On
Objects : 3
00:00:00 - CSEADS 100/100 - boxes 26 - depth 1 - objects 18
00:00:00 - CSEADS 100/100 - boxes 26 - depth 1 - objects 6
LfSoftLight::Init()
00:00:02 - cell 418176 / 418176
LfSoftLight::Init()
00:00:02 - cell 418176 / 418176
Rendering 400 x 400 pixels
00:00:45 - 93.0%
LfDOFImager():
row 400 / 400
mechanic.py 45秒でした。
metalight2も動いてます。仮想画面を1024*768にしました。
レンダリング、radiocity
ありがとうございます。
Fedora Linux 37でpythonの切り替え
■ヘルプ
$ alternatives --help
alternatives バージョン 1.21 - Copyright (C) 2001 Red Hat, Inc.
これは GNU 一般公有使用許諾書の規定の元で自由に再配布することができます。
使用法: alternatives --install <リンク> <名前> <パス> <優先度>
[--initscript <サービス>]
[--family
]
[--follower ]*
alternatives --remove <名前> <パス>
alternatives --auto <名前>
alternatives --config <名前>
alternatives --display <名前>
alternatives --set
alternatives --list
alternatives --remove-all
alternatives --add-follower
alternatives --remove-follower
ーーーーーーーーーーーーーーーーーーーーー
■確認
$ alternatives --config python
3 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
* 1 /usr/bin/python3.8
2 /usr/bin/python2.7
+ 3 /usr/bin/python3.11
ーーーーーーーーーーーーーーーーーーーーー
■アップグレードで削除されたバージョンのpython3.8のパスを削除する。
$ sudo alternatives --remove python /usr/bin/python3.8
ーーーーーーーーーーーーーーーーーーーーー
■確認
$ alternatives --config python
2 プログラムがあり 'python' を提供します。
選択 コマンド
-----------------------------------------------
*+ 1 /usr/bin/python3.11
2 /usr/bin/python2.7
■使用感
1400円で買った、外付け2.5インチSSDケースに、Fedora32からFedora37までにアップグレード。32--->34--->36--->37
5時間かかりました。ありがとうございます。
1/1