I don't know why the qemu-system error occurs - qemu

Why does an error appear as shown in the picture?
Is the command wrong?
Before entering that command, I entered the following:
apt-get update -y
Download vmlinux-3.2.0-4-4kc-malta or debian_wheez_mips_standard_qcow2 using wget command

The -redir option was removed in QEMU 3.1: https://www.qemu.org/docs/master/about/removed-features.html#redir-removed-in-3-1
You need to update the command line to use the newer syntax instead.

Related

Why new version of MySQL installation file shows the old version prompt?

The current installed MySQL version on my server (ubuntu 18.04) is 5.7, I need to update it to 8th version .. I'm following this instruction.
I'm at /home/martin# path and I executed apt-get update and apt-get upgrade as well. I've also executed this wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb and the installation file downloaded correctly.
Now, when I run this dpkg -i mysql-apt-config_0.8.22-1_all.deb, I get a prompt with old version:
See? it's still mysql-5.7. Why?
The expected result (based on the instruction) should be mysql-8.0.
Well it says "currently selected: mysql-5.7", but what happens when you actually select that item? As this is the Package configuration step it may well be that this is actually what's going to do the actual configuration replacement, so replacing 5.7 with the more recent install

Trying to access MySQL with perl script [duplicate]

Install information:
Using DBI 1.608 (for perl 5.008009 on x86_64-linux) installed in /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/auto/DBI/
error information:
[root#datacenterETL DBD-mysql-4.020]# perl ../testConnect.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in #INC (#INC contains: /usr/local/lib/perl5/5.8.9/x86_64-linux /usr/local/lib/perl5/5.8.9 /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.9 .) at (eval 3) line 3.
Perhaps the DBD::mysql Perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right.
It looks like you're using Linux. In that case, you might find it easier to install a pre-packaged version of the module.
On a Red Hat derivative try yum install perl-DBD-mysql; on a Debian derivative try apt-get install libdbd-mysql-perl.
Perhaps the DBD::mysql perl module hasn't been fully installed
...so install it.
cpan DBD::mysql
Or since you don't have internet access,
perl Makefile.PL
make
make test
make install
You'll need MySQL's development header files installed first, as per INSTALL
any error related to DBD::mysql error has not installed fully. Please run the below code in super user permission.
apt-get install libdbd-mysql-perl
As is was not able to comment (yet), I want to add something for the Mac Users.
I hat to add the --force command to install the everything properly as i have no local mySQL installation for the tests to pass.
/usr/bin/cpanm --force DBD::mysql worked for me. (Mac OS 10.9.2, Perl 5.12.4)
I've been tried perl -MCPAN -e shell on my mac OSX 10.8.5, but this didn't work.
I tried sudo perl -MCPAN ..., but didn't work too. I changed my ~.bash_profile to include
LD_RUN_PATH=/usr/local/mysql-5.6.13-osx10.7-x86_64/lib export LD_RUN_PATH
LD_LIBRARY_PATH=/usr/local/mysql-5.6.13-osx10.7-x86_64/lib export LD_LIBRARY_PATH
lines, and I tried -MCPAN again, with and without sudo, but this didn't work too.
I read some posts and I tried "get Bundle::DBD::mysql" in -MCPAN command line to download it and install with Makefile. Then, I entered the ~./cpan/build directory and I did a Makefile, but the make command didn't work. I tried Makefile with --testuser and --testpassword that I just had been configure in mysql. I entered the site https://discussions.apple.com/thread/3932531?start=0&tstart=0&fb_source=message that is informed in README doc of ./cpan/bundle, but I already had all command line tools of xCode installed and didn't work for me too.
Why don't do sudo perl -MCPAN -e shell and to force to install Bundle::DBD::mysql? This worked well and I got the installation.

How to install Cudnn from command line

Cudnn: https://developer.nvidia.com/cudnn
I login and go jump through all the hoops that NVIDIA wants you to do; however, when it comes time to download the file I can't seem to figure out how to do it via wget and the command line.
I was hoping someone has done this. I've copy and pasted the link that they want to click and used this in wget copy-and-pasted-url. But I just get back an html file.
The following trick works with Firefox:
Download the file with your regular machine
Go to the downloads list in firefox, right click on the file and click "Copy original download URL"
Go to your pure-terminal machine, and type:
wget PASTE-YOUR-LINK-FROM-FIREFOX
As #deltheil mentionned, by doing this the link contains a temporary download token, letting you download the file from another machine then the one it was requested from
EDIT
The downloaded filename is libcudnn***.deb?<some download token>. You will need to rename it by stripping the ? and everything after it:
mv libcudnn***.deb?xxx libcudnn***.deb
CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz"
wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE}
tar -xzvf ${CUDNN_TAR_FILE}
sudo cp -P cuda/include/cudnn.h /usr/local/cuda-8.0/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-8.0/lib64/
sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn*
The download link that you get right after the accept terms section is authenticated (the GET request gives you a HTTP 302 Moved Temporarily).
If you really want to grab the link from the command line: open your browser, use the developers tools and look at the Location field after the redirection: you can use this link directly with wget as it contains a short-lived authorization token.
You may try the following:
curl -O http://developer.download.nvidia.com/compute/redist/cudnn/v2/cudnn-6.5-linux-x64-v2.tgz
This will download CUDNN 6.5
The location for the latest one is in the NVIDIA latest Docker file, currently at:
https://github.com/NVIDIA/nvidia-docker/tree/master/centos-7/cuda/7.5/runtime/cudnn5
I tried all of these answers and none worked unfortunately.
Though a simple workaround is: apt-get update && apt-get install -y --no-install-recommends <cuDNN Package>
For example, in my case it is:
apt-get update && apt-get install -y --no-install-recommends libcudnn8
And it works!

how to fix this error " PHP Fatal error: Call to undefined function mysql_query() " in cake bake console [duplicate]

This question already has answers here:
Why shouldn't I use mysql_* functions in PHP?
(14 answers)
Closed 4 months ago.
I've seen this error in many places but the exact case.
I got this error while running the cake bake console, exactly after choosing C " controller " then choosing the default database config
i'm on Ubuntu 10.10 through Virtualbox
i'm using xampp - and installed the cakephp through the command apt-get install cakephp
here is the error
Use Database Config: (default/test)
[default] >
PHP Fatal error: Call to undefined function mysql_query() in /usr/share/php/cake/libs/model/datasources/dbo/dbo_mysql.php on line 588
Fatal error: Call to undefined function mysql_query() in /usr/share/php/cake/libs/model/datasources/dbo/dbo_mysql.php on line 588
Your issue is more than likely that some Linux distros have different php.ini's for Apache PHP and and PHP-CLI, it appears that your PHP-CLI (which cake baker will use) doesn't have the mysql_* functions enabled.
To fix, you'll need to locate the php.ini for the PHP CLI and uncomment the line which includes the mysql_* lib. should be something like "extension=mysql.so". To find the location of php.ini, run php -r 'phpinfo();' on the command line and scroll to the top to see the location of php.ini.
Reinstalling did the trick for me:
sudo apt-get remove php5-common
sudo apt-get install --reinstall php5-mysql
sudo apt-get install --reinstall php5-cli
(note: mine was not a live or system-critical php install - I was just trying to get phpsh working with some mysql code. ymmv.)
Another thing people usually miss out is to set the path of extension directory itself.
For example, look at the ini file at another thread. He had already uncommented the line extension=php_mysql.dll but had not set the appropriate extension_dir.
You need this line to be uncommented or added in:
extension_dir = "ext"
where ext is the path to the extension directory.
I used Ubuntu 10.04 and 11.04 and faced the same obstacle which has been annoying for quite a while, since I want to use bake for certain solutions.
To fix it you can open a terminal and type here:
php -i | grep 'Configuration File'
which yields something like this:
Configuration File (php.ini) Path => /usr/local/lib
Well and surprisingly enough this is not the default path to keep you php.ini file, it is rather /etc/php5/cli/
Now you can simply copy your php.ini into /usr/local/lib or see how to fix the Configuration File Path.
I assume you have php5-pgsql (using postgres) or php5-mysql (using MySql) installed. Otherwise you might set your Configuration File Path in any way

Mysql on the command line (can't use all keyboard buttons)

Using mysql directly from the command line (running on Ubuntu 9.10, standard bash terminal), I am unable to use certain keyboard buttons like:
Delete, Control-(arrow right), Control-(arrow left)
Which gets returned to me as:
~;5C;5D
respectively. I'm assuming there must be a flag in mysql that fixes this but I have been unable to find one. Is there a .mysqlconfig file to edit to make this happen on startup?
According to this thread and mysql --version, mysql is compiled with editline instead of readline. From that thread:
I had to add create an .editrc file with the following lines to get ctrl-R and DELETE to work.
bind "\e[3~" ed-delete-next-char
bind "^R" em-inc-search-prev
Although that didn't work for me.
Another suggestion from that thread did work:
$ sudo apt-get install rlwrap
Then add an alias in ~/.bashrc
alias mysql='rlwrap -a mysql'
This problem may be specific to Ubuntu 9.10