Ubuntu : Crash de update-manager

J’avais donc des crash de update-manage, j’ai donc utilisé plusieurs méthodes vu sur Google.

Voici le crash que j’avais :

$ update-manager 
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 28, in 
    import gi
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in 
    from . import _gi
ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)

$ cd /usr/lib/python3/dist-packages/gi/
/usr/lib/python3/dist-packages/gi$ ls *.so
_gi_cairo.cpython-36m-x86_64-linux-gnu.so
_gi.cpython-36m-x86_64-linux-gnu.so
_gi.cpython-37m-x86_64-linux-gnu.so

Solution 1 :

$ sudo apt-get install --reinstall dbus python-dbus python3-dbus

=> Echec.

Solution 2 :

$ sudo apt purge update-manager && sudo apt install update-manager

=> Echec.

Solution 3 :

$ sudo rm  /usr/bin/python3
$ sudo ln -s /usr/bin/python3.6 /usr/bin/python3

Avant j’avais (python3 -> python3.8) et maintenant j’ai (python3 -> python3.6)

==> Réussite (partielle).

$ update-manager 
WARNING:root:can not import unity GI Namespace Dbusmenu not available
Gtk-Message: 09:25:18.817: GtkDialog mapped without a transient parent. This is discouraged.
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <> line 9.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 9.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 9.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <> line 21.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 21.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 21.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <> line 25.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 25.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 25.
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <> line 12.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 12.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 12.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <> line 16.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 16.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <> line 16.
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
...

Ubuntu : Itunes via Wine : rien de bon …

J’ai essayé l’installation de iTunes avec Wine sous Ubuntu.

Les versions :

J’ai eu une seule erreur, c’est lors de l’installation des fonts. Pour la fixer j’ai du faire la modification du checkum. L’erreur c’était : sha256sum mismatch! Rename .cache/winetricks/PowerPointViewer/PowerPointViewer.exe and try again.

sudo sed -i -e s/249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423/e17cb384eeac4caf08a4f5d4bceb9697fff83fa942d2a3d9ad0294a9b1774390/g /usr/bin/winetricks

L’installation des fonts :

sudo apt install winetricks
winetricks allfonts

Sachant que l’installation suivante permet d’eviter des problèmes de checksum :

sudo apt-get remove winetricks
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks 
sudo mv -v winetricks /usr/bin

L’espace que cela prend sur le disque :

$ du -sh .cache/winetricks/
350M .cache/winetricks/
$ du -sh .wine/
1,9G .wine/

Quand je lance iTunes j’ai un joli carré noir :

Bref c’est pas le top. J’ai donc lancé winecfg pour modifier et passer de Windows 7 à Windows XP.

Avec Windows XP pas de lancement de iTunes, j’ai donc mis Windows 8.1 et Windows 10 (toujours noir).

Ensuite j’ai essayé de mettre Steam :

Crash …

Ubuntu : ntfsfix ( chkdsk sous Windows) pour fixer les problèmes NFTS sous Ubuntu.

Voici un petit exemple pour fixer les problèmes NTFS sous Ubuntu :

$ sudo mount /dev/sdc2 /media/usb-drive/
$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdc2': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
$ sudo ntfsfix /dev/sdc2
Mounting volume... $MFTMirr does not match $MFT (record 0).
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdc2 was processed successfully.
$ sudo mount /dev/sdc2 /media/usb-drive/
$ 

Installation de Darling sous Ubuntu afin de lancer des logiciels MacOS

Quelques informations sur mon système :

$ uname -r
5.3.0-40-generic
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) 

La première étape de l’installation :

$ sudo apt-get install cmake clang bison flex xz-utils libfuse-dev libudev-dev pkg-config libc6-dev:i386 linux-headers-generic gcc-multilib libcap2-bin libcairo2-dev libgl1-mesa-dev libtiff5-dev libfreetype6-dev libfreetype6-dev:i386 git libelf-dev libxml2-dev libegl1-mesa-dev libfontconfig1-dev libbsd-dev

Ensuite on charge les sources :

$ git clone --recursive https://github.com/darlinghq/darling.git

Après on fait le build :

$ cd darling
$ mkdir build && cd build
$ cmake ..
...
CMake Error at cmake/FindFFmpeg.cmake:86 (message):
  Could not find libavcodec or libavformat or libavutil
...

J’ai donc fait ceci :

sudo sudo apt-get install -y \
    libavformat-dev libavcodec-dev libavdevice-dev \
    libavutil-dev libswscale-dev libavresample-dev

J’ai relancé un cmake :

$ cmake ..
...
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PulseAudio! (missing: PULSEAUDIO_LIBRARIES
  PULSEAUDIO_INCLUDE_DIRS)
...

J’ai donc essayé ceci :

$ sudo apt-get install pulseaudio libpulse0 
...

Mais j’avais déjà les librairies. J’ai donc fait le plan B :

$ sudo apt-get install libpulse-dev pulseaudio apulse

Je relancé un cmake pour la troisème fois :

$ cmake ..
...
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
...

J’ai donc essayé ceci :

$ sudo apt-get install libgif-dev

La quatrième cmake est donc le bon :

$ cmake ..
...
$ make
...
ld: file not found: /System/Library/PrivateFrameworks/FMDB.framework/Versions/A/FMDB for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:24779: recipe for target 'src/external/JavaScriptCore/JavaScriptCore' failed
make[2]: *** [src/external/JavaScriptCore/JavaScriptCore] Error 1
CMakeFiles/Makefile2:62019: recipe for target 'src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all' failed
make[1]: *** [src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

A noter que le reste de l’installation fonctionne :

$ make lkm
...
$ sudo make lkm_install
...

Je vais refaire un test avec la commande :

$ git clone --recurse-submodules https://github.com/darlinghq/darling.git

Puis j’ai relancer le build :

$ time sudo make
...
[100%] Linking CXX shared library JavaScriptCore
ld: warning: OS dylibs should not add rpaths (linker option: -rpath) (Xcode build setting: LD_RUNPATH_SEARCH_PATHS)
ld: file not found: /System/Library/PrivateFrameworks/FMDB.framework/Versions/A/FMDB for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:24779: recipe for target 'src/external/JavaScriptCore/JavaScriptCore' failed
make[2]: *** [src/external/JavaScriptCore/JavaScriptCore] Error 1
CMakeFiles/Makefile2:62019: recipe for target 'src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all' failed
make[1]: *** [src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

real	208m3,434s
user	188m7,313s
sys	18m55,609s

Le but était de tester : https://www.rubitrack.com/ .

Sniff.

UPDATE :

J’ai finalement réussi (merci Luc) :

$ darling shell
Loaded the kernel module

$ uname -a
Darwin CYBERNEURONES 16.0.0 Darwin Kernel Version 16.0.0 x86_64

$ hdiutil attach ../../../Téléchargements/rubiTrack-5.3.1.dmg 
/Volumes/rubiTrack-5.3.1

$ cp -r /Volumes/rubiTrack-5.3.1/rubiTrack\ 5\ Pro.app /Applications/

$ /Applications/rubiTrack\ 5\ Pro.app/Contents/MacOS/rubiTrack\ 5\ Pro 
dyld: Symbol not found: _WebActionNavigationTypeKey
  Referenced from: /Applications/rubiTrack 5 Pro.app/Contents/MacOS/rubiTrack 5 Pro (which was built for Mac OS X 10.11)
  Expected in: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
 in /Applications/rubiTrack 5 Pro.app/Contents/MacOS/rubiTrack 5 Pro
abort_with_payload: reason: Symbol not found: _WebActionNavigationTypeKey
  Referenced from: /Applications/rubiTrack 5 Pro.app/Contents/MacOS/rubiTrack 5 Pro (which was built for Mac OS X 10.11)
  Expected in: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
 in /Applications/rubiTrack 5 Pro.app/Contents/MacOS/rubiTrack 5 Pro; code: 4
Abort trap: 6