I'mt trying to run beaglebone image on qemu following this tutorial. im using ubuntu 14.04 and installed qemu as shown in the tutorial
when ruining the command
qemu-system-arm -M beaglexm -drive if=sd,cache=writeback,file=Angstrom-TI-GNOME-image-eglibc-ipk-v2012.01-core-beagleboard-2012.01.11.img -clock unix -serial stdio -device usb-kbd -device usb-mouse -usb -device usb-net,netdev=mynet -netdev user,id=mynet
I got this error :
qemu-system-arm: symbol lookup error: qemu-system-arm: undefined symbol: libusb_get_port_numbers
I dont know if it's libusb version issue or what.
There is a similar bug report on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711589
I had the same message on my system. To solve it you have, as root, to link in the correct libusb.
sudo ln -sf /lib/x86_64-linux-gnu/libusb-1.0.so.0 /usr/local/lib/libusb-1.0.so.0
Start by running (YMMV on where the 'qemu' binaries are located):
ldd /usr/bin/qemu-system-arm
You should get a lot of output indicating what runtime libs Qemu needs and where the system is finding them. The fact that you are getting a 'missing symbol' error means that a shared library is on the system, it just isn't exporting the 'libusb_get_port_numbers' function signature.
If the above is true, then either A) your distro's 'libusb' packages don't export that function (it might have been deprecated) or B) you have some other 3rd party application that installed it's own 'libusb' (MPLABX does this, puts it in /usr/local/lib and symlinks back to /opt/microchip).
Without any more OS info etc, it's hard to help.
Related
First, some background:
I suppose I've found a bug with KVM, at least on my system.
When I try to install Windows XP via virt-manager, the installer aborts/reboots.
But if I run a raw qemu-system-i386 command (see below), it succeeds.
From looking at the logs in /var/log/libvirt/qemu/..., the key difference is the "accel=kvm" argument (equivalent to -enable-kvm).
So, narrowing it down, this command succeeds:
qemu-system-i386 \
-m 512 \
-usb \
-cdrom path/to/WinXP_CD.iso \
-boot d \
"$image"
But this next command results in an infinite series of reboots. The XP installer starts, but after scanning the system, just reboots rather than proceeding:
qemu-system-i386 \
-enable-kvm \
-m 512 \
-usb \
-cdrom path/to/WinXP_CD.iso \
-boot d \
"$image"
Perhaps you don't believe I have KVM working properly on my system.
But, I can install other OSes (eg: FreeBSD) using KVM just fine. This seems to be XP-specific.
So now, my questions:
How do I force libvirt to NOT use KVM for a chosen VM? Ideally via virt-manager, but I'm fine with virsh too.
I imagine somewhere in the mess of XML is some setting, but I'm not terribly familiar.
aside: any idea where I should log this bug? Against KVM? Libvirt? QEMU?
Well, I managed to hack around this, but I'm sure there's a more pretty way.
Basically, that -enable-kvm option corresponds to the type="kvm" value in your domain XML file. See libvirt documentation.
But there seems to be no way to change this from virt-manager. I'm not familiar enough with virsh yet to do it that way either. So, I just manually edited my XML file like so:
$ sudoedit /etc/libvirt/qemu/myxp.xml
I did this while virt-manager was closed.
When I opened it, the setting did not seem to stick. For some reason, I seemed to need to run:
$ sudo virsh define /etc/libvirt/qemu/myxp.xml
to get it to stick.
Anyway, after that little dance, then in virt-manager, in the `Overview' tab for my VM, it says "Hypervisor: QEMU TCG", where it had "KVM" before.
And now, the XP installer works!
Again, probably a better way, but good enough for now.
Presumably, performance will be poorer with KVM disabled. I still don't know who to send a bug, or whether this is a QEMU or KVM issue, at its core.
You can change
<domain type="kvm">
to
<domain type="qemu">
as as stated in the documentation.
To edit xml of VM in virt-manager you should activate xml editing in parameters and press "xml" tab.
I installed scilab.6.0.0 and backdoor fromscilab website (which I could not find it from Application>Module maneger>atom>Technical). I moved the backdoor file my home and from scilab command line I installed it
-->atomsInstall('/home/user/BackDoor_0.2_5.5.bin.x86_64.linux.tar.gz')
Even though, it installed backdoor successfully, when I restart the scilab I got this error message with backdoor
Start Toolbox BackDoor
Load macros
atomsLoad: An error occurred while loading 'BackDoor-0.2':
lib: Old binary lib detected. Please recompile it for Scilab 6.
As I understand I need to update the library, but I don't know how?
Would sb tell me explicitly (because I am a newbie user of scilab) how can I get over the error?
at the and I try to connect octave and scilab and when I try to run a demo script at octave I get also this error
>> sci_sim_example
Scilab connection failed
FYI: I already installed sci_cosim package (after I downloaded the package, I write to octave prompt >>pkg install sci_cosim_0.1.3.tar.gz), and I load it before running the script.
How can I recompile the lib: Old binary lib detected
Thank you so much for your help in advance
Here's what worked for me.
Download Scilab 5.5.2 (link for Linux 64bit version)
Extract the .tar.gz file in your preferred system location to install it there. Generally, my preferred location to extract / install self-contained packages is inside /opt .
You can extract the .tar.gz file using your filebrowser's graphical facilities, or on the command line; if /opt is owned by root (which it usually is) you may need to change ownership after extraction. E.g. your installation might look something like this:
cd /opt
sudo wget http://www.scilab.org/download/5.5.2/scilab-5.5.2.bin.linux-x86_64.tar.gz
sudo tar -xvzf ./scilab-5.5.2.bin.linux-x86_64.tar.gz
sudo rm scilab-5.5.2.bin.linux-x86_64.tar.gz
sudo chown $USER ./scilab-5.5.2 -R
Launch scilab by typing
/opt/scilab-5.5.2/bin/scilab &
in your terminal.
Once scilab is launched, go to Applications->Module Manager ATOMS. In the new window that comes up, click on All modules -> BackDoor -> Install.
You should get a message saying "Installation done, please restart SciLab".
Exit Scilab, and launch it again from the terminal. If you see a message:
atomsLoad: An error occurred while loading 'BackDoor-0.2':
File "/opt/scilab-5.5.2/share/scilab/contrib/BackDoor/0.2/etc/backdoor.start" does not exist.
then type the following commands in your terminal to rename the affected files:
cd /opt/scilab-5.5.2/share/scilab/contrib/BackDoor/0.2/etc/
mv BackDoor.start backdoor.start
mv BackDoor.quit backdoor.quit
Restart SciLab again. Hopefully this time it will work and SciLab will inform you that BackDoor is listening for connections at a certain port.
PS. Also note that from the octave side of things, the -auto option is no longer accepted when you perform a pkg install. You will need to load the sockets and sci_cosim packages manually each time you want to use this.
I'm trying to use cuda to accelerate tensorflow. I'm running tensorflow using the docker image.
Firstly, when I launch the gpu image, it has a mismatch in the LT_LIBRARY_PATH environment variable:
~# echo $LD_LIBRARY_PATH
/usr/local/nvidia/lib:/usr/local/nvidia/lib64:
root#d578acbbc2cd:~# ls /usr/local/
bin cuda cuda-7.0 etc games include lib man sbin share src
There's no nvidia directory there. When I try to run the convolutional.py demo, it can't initialise the cuda support:
# python models/image/mnist/convolutional.py
Succesfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Succesfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Succesfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Succesfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 8
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.0-23-generic/modules.dep.bin'
E tensorflow/stream_executor/cuda/cuda_driver.cc:466] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:98] retrieving CUDA diagnostic information for host: d578acbbc2cd
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:106] hostname: d578acbbc2cd
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:131] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:242] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.68 Tue Dec 1 17:24:11 PST 2015
GCC version: gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:135] kernel reported version is: 352.68
I tensorflow/core/common_runtime/gpu/gpu_init.cc:112] DMA:
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 8
It then goes on to train using cpu only.
# find /usr -name libcuda.so
/usr/lib/x86_64-linux-gnu/libcuda.so
So in the docker image, there's only the gnu cpu cuda implementation. No NVIDIA stuff. In the host ubuntu 15.10 session, I have libcuda.so installed:
$ find /usr -name libcuda.so
/usr/lib/x86_64-linux-gnu/libcuda.so
/usr/lib/i386-linux-gnu/libcuda.so
/usr/local/cuda-7.5/targets/x86_64-linux/lib
/stubs/libcuda.so
So these seem to be stubs ... not sure why.
Is there some trick to getting this to work?
Try rebuilding the Docker image directly from the Tensorflow repository (i.e. don't rely on the image on the container registry) and use https://github.com/NVIDIA/nvidia-docker to run the container (the Docker command described in the Tensorflow documentation is not portable).
I had a similar problem, though not in docker. The libcuda.so in /usr/local/cuda/lib64/stubs was a broken sym link. When I searched for libcuda.so it only turned up a file in a lib32 folder.
It seems that the problem was how I originally installed the NVIDIA device driver. At some point in the driver install process you're given the option to install the lib32 drivers. I had thought this meant in addition to lib64 drivers so I selected it. Turns out it only installs lib32 and not lib64 drivers.
I reinstalled the NIVDIA device driver, this time not selecting the lib32 'option'. Now tensorflow finds libcuda.so.
I had the same problem with running tensorflow on a Ubuntu machine after I upgraded my driver to 352.63 and 352.93. (I remember it works with 346.* but when I try to install 346., it installs 352. automatically for some reason).
I finally figured out that it's caused by permission issue. (I can run it with root) So, I changed the permission of the libcuda.so.352-63 file to executable by anyone and it works well now.
Hope this will be helpful to those still struggling with this issue.
I didn't try the docker one, but I guess it's also caused by permission setting.
Try this command
sudo apt-get install nvidia-modprobe
As mentioned here:
https://github.com/tensorflow/tensorflow/issues/394
and
http://kkjkok.blogspot.in/2016_08_01_archive.html
After I updated NVIDIA driver to 378.09 on Ubuntu 14.10 I had the same error,
although all the right for lib files were set correctly.
Thanks to #PhoenixQ, I tried to run with sudo and it worked.
After that I tried to run without sudo one more time and error disappeared. I'm not sure what ecxactly happened, but maybe something was configured during call with sudo, which was not possible withous sudo.
So the solution:
Try to run the same thing with sudo.
After this. Tryu running without sudo. Worked for me.
I want to boot xv6(unix based os) on Qemu.I compile It from source code and also install qemu but when I type make qemu in terminal I get the following errors:
/usr/bin/qemu-system-i386 -serial mon:stdio -hdb fs.img xv6.img -smp 2 -m 512
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
but qemu runs (with flicks) and write : no bootable device
I am also read this discussion in SO but doesn't solve my problem.
Note:first qemu can't find QEMU executable and according to this link I solve my problem by changing the #QEMU= with QEMU = /usr/bin/qemu-system-i386 then I have this problem.
EDIT:I finally find the solution.my XV6 source code has a problem(that I don't know what?) then I download it from MIT OS course with this commands:
git clone git://pdos.csail.mit.edu/xv6/xv6.git
cd xv6/
make
qemu-system-i386 -serial mon:stdio -hdb fs.img xv6.img -smp 1 -m 512
i had something similar. are you using a makefile perhaps when you compile?
from some reason for me it didn't recognize some of the time where the file sign.pl was because it was written "./sign.pl" and not /./sign.pl
also make sure to have all of your files with all of the permission required (for example: chmod 700 *)
I've recently installed MacPorts as explained on MacPorts website. All the process went well. The .profile file in my home directory has been updated (in this file the paths "/opt/local/bin" and "/opt/local/sbin" are added to the environment variable PATH) and all the macports files are in the directory "/opt". When I type "which port" in the shell, it returns "/opt/local/bin/port".
But something weird happens when I ask to install the port "octave-devel" (I've installed MacPorts to use Octave on my Mac in the first place). So when I enter the command "sudo port install octave-devel +atlas+docs" (as explained in GNU Octave wiki) in the terminal and type my password, the shell replies "Error: Port octave-devel not found". However the port "octave-devel" seems to exist because I've found its description on this page of the macports website.
Because I had to use Octave quickly I first wanted to uninstall MacPorts and install Fink instead and I tried the method described on the MacPorts website but after I typed "sudo port -fp uninstall installed" it returned "Error: No ports matched the given expression". I couldn't even uninstall this software! I really think that it is a problem of MacPorts itself and not the octave port but I can't find what exactly.
Eventually I used Octave on a Windows computer but it annoys me not to know what is wrong with MacPorts on my computer. And mainly, I want to be capable to use GNU Octave on my Mac because I need it for school.
Thank you in advance and happy holidays.
I'm not sure which version of OSX you are running, however, I have octave (not octave-devel) version 3.6.4 installed via macports on a machine running OSX 10.9.1. This was built using:
sudo port install octave
which yields a known bug building the atlas dependency that results from a missing fortran compiler. At this point you have two options. Before attempting to install octave first try to install atlas separately, either overriding the standard clang compiler with the gcc4x flag, or install atlas using:
sudo port install atlas +nofortran
which runs fine using clang. With atlas installed, octave should build to completion although there is a possibility that you will find an error regarding the use of arpack by apple as a vector library. Using +arpack is preferred, so it may be useful to load this by hand as well before starting your octave install.
Trying to install Octave using MacPorts I ran into a similar problem.
Summary
My solution was to first clean & build atlas separately using gcc47 instead of the default mpclang34. Then to build the default octave.
Details
This is on a MacBook running an older OS (10.7.5), the standard Octave (3.8.2) package failed to build - it hung on building the atlas dependency.
Solution:
sudo port clean atlas
sudo port -v install atlas +gcc48
sudo port -v install octave +atlas+docs
I'm currently going through the process of installing Octave via MacPorts. I used the following command which I found on Shifteleven.com:
sudo port install octave-devel +gcc45
It seems to be working so far. You also need to make sure you've installed the Xcode command line tools, which is something that I forgot to do the first time I tried.
I also ran into problems installing Octave using Macports on OSX 10.10.1 and solved them, similar to #Tom_N_PDX and #isak.
Short version
I got it working using one of the options described by #isak.
More detailed version
Running sudo port install octave failed because of the missing Fortran compiler problem.
I next installed Fortran using Macports sudo port install gcc48 and then tried re-installing Octave
sudo port clean octave
sudo port install octave
This "hung" on Atlas, as others have mentioned, although I now realize it just takes a long time and I killed it before it finished. Likely it would have worked, as the output said it had found Fortran
Selected C compiler: /usr/bin/clang
Selected F77 compiler: gfortran48
I then installed atlas separately, using the +gcc48 flag, as suggested by #isak
sudo port install atlas +gcc48
but it displayed the same compiler information as above (consistent with my conjecture that the above would have worked). This process took about 4 hours. You can monitor the progress of the task in the logfile (found with the command sudo port logfile atlas), which reassures you it's doing something and not "hung". (Oddly the output does halt mid-message, but it always eventually resumed. Also there were a lot of warning messages.)
Last, running the following worked:
sudo port clean octave
sudo port install +arpack
I actually first tried without the +arpack option and it worked but I got the following message, consistent with #isak's answer
WARNING: Dependency 'arpack' is installed with the +accelerate variant, using Apple's Vector Libraries which have some known bugs that can cause Octave to crash if using certain functions in arpack. The +atlas variant does not have these issues with Octave, but does take many hours to compile even on modern hardware.
When I reinstalled Octave with the +arpack flag it took less than a minute (because I had already installed Atlas).
I had a similar problem with MacPorts. I would recommend using HomeBrew instead. Here are the commands to install Octave on HomeBrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew upgrade
brew install octave