When installing MySQL workbench on Linux if you get this error below it is most probably due to a previous version of MySQL workbench still have some data on your PC.
trying to overwrite '/usr/share/mysql-workbench/shell_snippets.py.txt'
To fix make sure MySQL workbench is removed and also make sure the package "mysql-workbench-data" is removed
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Friday, October 18, 2013
Friday, June 22, 2012
Oracle (sun) java 6 install
I am currently running Mint Linux 13 which comes with OpenJDK/JRE but I require Oracle(Sun) Java here is how to install manually. I know there are PPA's out there but I do not find them very reliable since Oracle seem to have some licensing issue with 3de parties hosting Java binaries.
Step 1: Download
Go to the Oracle site and select your Java. http://www.oracle.com/technetwork/java/javase/downloads/index.html
Step 2: Extract
I downloaded Java 7 JDK so to extract was simply
Step 3: Move
When you install Java via a package manager for a Debian system the install location is /usr/lib/jvm/. If you go have a look at that folder you should see all the installed version of java on you pc. So to move the extracted folder:
This will move and rename the folder to java-7-sunjdk
Step 4: Install
Linux has this amazing command to where you can link commands with the option of easy switching.
So to list all the currently installed options for the command java type
As you can see here I only have Java 6 OpenJDK installed for the command java. Now to add my Oracle java I will have to install a new option as follow:
Now if I rerun the list command I have two options for the java command
Step 5: Select Default
Now to select which one must be executed by default if I run the java command:
When you run this command you are show the current default and all the available options. In my case I selected option 2 as my new default.
Step 6: Jippy
Your all done below are just some command for the ease to map the javaws, javac and jps. Your more than welcome to add more.
Step 1: Download
Go to the Oracle site and select your Java. http://www.oracle.com/technetwork/java/javase/downloads/index.html
Step 2: Extract
I downloaded Java 7 JDK so to extract was simply
tar -xvf ~/Downloads/jdk-7u5-linux-x64.tar.gz
Step 3: Move
When you install Java via a package manager for a Debian system the install location is /usr/lib/jvm/. If you go have a look at that folder you should see all the installed version of java on you pc. So to move the extracted folder:
sudo mv ~/Downloads/jdk1.7.0_05 /usr/lib/jvm/java-7-sunjdk
This will move and rename the folder to java-7-sunjdk
Step 4: Install
Linux has this amazing command to where you can link commands with the option of easy switching.
So to list all the currently installed options for the command java type
user@user-SERVER ~ $ sudo update-alternatives --list java
/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
As you can see here I only have Java 6 OpenJDK installed for the command java. Now to add my Oracle java I will have to install a new option as follow:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7-sunjdk/bin/java" 1
Now if I rerun the list command I have two options for the java command
user@user-SERVER ~ $ sudo update-alternatives --list java
/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-7-sunjdk/bin/java
Step 5: Select Default
Now to select which one must be executed by default if I run the java command:
user@user-SERVER /usr/lib/jvm $ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-sunjdk/bin/java 1 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-7-sunjdk/bin/java to provide /usr/bin/java (java) in manual mode.
When you run this command you are show the current default and all the available options. In my case I selected option 2 as my new default.
Step 6: Jippy
Your all done below are just some command for the ease to map the javaws, javac and jps. Your more than welcome to add more.
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7-sunjdk/bin/javac" 1
sudo update-alternatives --config javac
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java-7-sunjdk/bin/javaws" 1
sudo update-alternatives --config javaws
sudo update-alternatives --install "/usr/bin/jps" "jps" "/usr/lib/jvm/java-7-sunjdk/bin/jps" 1
sudo update-alternatives --config jps
Wednesday, May 16, 2012
Ivy Bridge HD4000 Linux Freeze
First thing I did after I received my new Ivy Bridge PC with Gigabyte GA-Z77-D3H and Intel Core i7 3770 was install the new Ubuntu 12.04. All was fine for a while until the PC would freeze up, mouse not moving, ATL+CTRL+F1 not working, nothing! This seemed to happen every-time semi heavy load was placed on the HD 4000 graphics processor on the i7 chip. Something I found that really triggered this was browsing websites like Google maps or scrolling up and down on a page with lots of dynamic content in Firefox it is a guaranteed freeze.
After a bit of trail and error the solutions was found. There seems to be a bug in the Linux Kernel 3.2.x. Now after upgrading to Kernel 3.3.x the problem has disappeared! Below are the steps to update the kernel in Ubuntu 12.04.
Please note I do not take any responsibility if this breaks things. This worked for me and I am merely trying to help others.
At the time of writing this article the latest stable kernel is 3.3.6
The kernel can be found at kernel.ubuntu.com or you can just ignore this and copy and past the commands below to the terminal depending on you installation
For Ubuntu (i386 / 32-bit) run these commands
For Ubuntu (amd64 / 64-bit) run these commands
Just reboot your system and done.
I you have any questions/problems please leave a comment and I will try to help
After a bit of trail and error the solutions was found. There seems to be a bug in the Linux Kernel 3.2.x. Now after upgrading to Kernel 3.3.x the problem has disappeared! Below are the steps to update the kernel in Ubuntu 12.04.
Please note I do not take any responsibility if this breaks things. This worked for me and I am merely trying to help others.
At the time of writing this article the latest stable kernel is 3.3.6
The kernel can be found at kernel.ubuntu.com or you can just ignore this and copy and past the commands below to the terminal depending on you installation
For Ubuntu (i386 / 32-bit) run these commands
cd /tmp && wget -O linux-headers-3.3.6-030300_3.3.6_all.deb http://goo.gl/zNlMy
sudo dpkg -i linux-headers-3.3.6-030300_3.3.6_all.deb
cd /tmp && wget -O linux-headers-3.3.6-generic_i386.deb http://goo.gl/TdBex
sudo dpkg -i linux-headers-3.3.6-generic_i386.deb
cd /tmp && wget -O linux-image-3.3.6-generic_i386.deb http://goo.gl/osZhw
sudo dpkg -i linux-image-3.3.6-generic_i386.deb
For Ubuntu (amd64 / 64-bit) run these commands
cd /tmp && wget -O linux-headers-3.3.6-030300_3.3.6_all.deb http://goo.gl/zNlMy
sudo dpkg -i linux-headers-3.3.6-030300_3.3.6_all.deb
cd /tmp && wget -O linux-headers-3.3.6-generic_amd64.deb http://goo.gl/Z9Ztt
sudo dpkg -i linux-headers-3.3.6-generic_amd64.deb
cd /tmp && wget -O linux-image-3.3.6-generic_amd64.deb http://goo.gl/jji3o
sudo dpkg -i linux-image-3.3.6-generic_amd64.deb
Just reboot your system and done.
I you have any questions/problems please leave a comment and I will try to help
Wednesday, February 29, 2012
Packet drops in Ubuntu and Fedora with Realtek NIC driver r8169
The Problem
I recently purchased a Gigabyte GA-Z68X-UD4-B3 motherboard, installed Ubuntu and started to download eclipse. The download took forever! Tried to open a few websites and some of them just timed out. I was just about to get on the phone with the ISP when I noticed doing a ping the router some packets where being lost!
The solution
The motherboard comes with a Realtek network card running the r8169 chip. Now for some reason Ubuntu and Fedora detects this as a r8168.
To check this run:
Step one is to download the driver required from Realtek
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false
Once the download is complete extract
I recently purchased a Gigabyte GA-Z68X-UD4-B3 motherboard, installed Ubuntu and started to download eclipse. The download took forever! Tried to open a few websites and some of them just timed out. I was just about to get on the phone with the ISP when I noticed doing a ping the router some packets where being lost!
The solution
The motherboard comes with a Realtek network card running the r8169 chip. Now for some reason Ubuntu and Fedora detects this as a r8168.
To check this run:
lsmod | grep r8168If you get a output if means your using the r8168 driver instead of the r8169.
Step one is to download the driver required from Realtek
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false
Once the download is complete extract
tar vjxf r8168-8.tar.bz2The next step will disable the network interface, remove the r8168 module.
sudo rmmod r8168Now run the autorun.sh file in the extracted folder
sudo ./autorun.shBlacklist the r8168 module form being loaded again you will have to add it to the blacklist
sudo gedit /etc/modprobe.d/blacklist.confAdd the following line:
blacklist r8169Update the driver cache
sudo update-initramfs -uNow to check that everything went according to plan run
lsmod | grep r8168If you get a output your done and dusted!
Monday, February 27, 2012
LXDE HDMI as default audio output device
The Problem:
If you are have a old pc running a lightweight linux interface like LXDE or XFCE, e.g LUbuntu and need to get the audio out to work via the HDMI you most probably have notices there is not a nice GUI to do this like in Ubuntu.
The Solution:
pavucontrol is a great and simple solution. I know it is a bit heavyweight since you have to install pulseaudio but it is the easiest solution I have found. To install:
If you are have a old pc running a lightweight linux interface like LXDE or XFCE, e.g LUbuntu and need to get the audio out to work via the HDMI you most probably have notices there is not a nice GUI to do this like in Ubuntu.
The Solution:
pavucontrol is a great and simple solution. I know it is a bit heavyweight since you have to install pulseaudio but it is the easiest solution I have found. To install:
sudo apt-get install pulseaudio pavucontrolthen to run
pavucontrol
Subscribe to:
Posts (Atom)