Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

April 4, 2010

Flash problems after upgrading from Hardy to Lucid

I upgraded Ubuntu 8.04 (Hardy Heron) to 10.04 (Lucid Lynx) a few days ago. While it is still in "RC" stage, the graphical update-manager already offered me the upgrade. Which I did. I had to resolve to an ugly fix after the upgrade to get the proprietary Adobe Flash working. No matter what apt-get command I entered, there was this error message:
Package is in a very bad inconsistent state - you should reinstall it before attempting a removal.
There were a few others too who had similar problems on Ubuntu forums and this solution finally worked for me: remove all occurances of "flashplugin-installer" and "flashplugin-nonfree" from /var/lib/dpkg/status.

July 9, 2009

Oracle 10g on Ubuntu 9.04 x86_64

I installed Oracle 10g for testing a particular piece of code. My development environment is:
$ uname -om ; lsb_release -a|grep ^De
x86_64 GNU/Linux
Description:    Ubuntu 9.04
and before installing I read some horror stories of people trying to run Oracle on Debian and/or x86_64. These were old posts, so I went on to try it out. In the end I had no hitches and it just works. :) After downloading the deb package, I installed some core libraries someone recommended. I have no idea if all of these are required (why gcc/make when this is a binary package?) but for the reference, this is what I installed before the oracle deb. BTW, that blog has good tuning tips.
sudo apt-get install gcc libaio1 lesstif2 lesstif2-dev make libc6 libc6-i386 libc6-dev-i386 libstdc++5 lib32stdc++6 lib32z1 ia32-libs
Oracle was a breeze to install:
$ dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.0_i386.deb
dpkg - warning, overriding problem because --force enabled:
 package architecture (i386) does not match system (amd64)
(Reading database ... 234278 files and directories currently installed.)
Unpacking oracle-xe-universal (from oracle-xe-universal_10.2.0.1-1.0_i386.deb) ...
Setting up oracle-xe-universal (10.2.0.1-1.0) ...
update-rc.d: warning: /etc/init.d/oracle-xe missing LSB information
update-rc.d: see 
Executing Post-install steps...
-e You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.


 $ /etc/init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g Express
Edition.  The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts.  Press  to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:8888

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8888/apex"
Apex works so I am happy, but how about a command line console? Ah, there's SQL*Plus. I needed to set up some environment variables (note the unorthodox install location of the binary), which I based on the packaged shell script "/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh" I put this in /etc/environment:
export ORACLE_HOME="/usr/lib/oracle/xe/app/oracle/product/10.2.0/server"
PATH="${PATH}:${ORACLE_HOME}/bin"
export ORACLE_SID=XE
Testing the admin account, and checking the platform. Oracle is running in 32-bit mode, while the platform is 64-bit.
$ sqlplus SYS AS SYSDBA

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 9 15:10:54 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> select platform_name from v$database;

PLATFORM_NAME
--------------------------------------------------------------------------------
Linux IA (32-bit)
The SQL*Plus help files need to be manually loaded:
cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/sqlplus/admin/help
  sqlplus SYS AS SYSDBA @helpdrop.sql
  sqlplus SYS AS SYSDBA @hlpbld.sql helpus.sql
In conclusion, I was happy to get it running without running a virtual Centos server. =)

May 4, 2009

NSLU2 + UTF8 ♥

NSLU2 aka ”slug” is a small consumer-grade embedded ARM device. It is not very fast but quite handy and completely silent. It consumes only ~5 W with an USB flash drive attached. However the Debian image I use does not come with all the needed locales but it's easy to generate them.

Include whatever locales you like to /etc/locale.gen and generate them:

 # locale-gen
Generating locales (this might take a while)...
  en_GB.ISO-8859-1... done
  en_GB.ISO-8859-15... done
  en_GB.UTF-8... done
...
Generation complete.
The next step is to configure the proper keyboard layout.
 # apt-get install console-data console-tools debconf
 # dpkg-reconfigure console-data
Finally, define the default system-wide locale:
 # echo 'LC_ALL="en_GB.UTF-8"' > /etc/default/locale

March 23, 2009

Notes on using multiple ALSA cards

The last few weeks have been quite exciting. I studied how to configure two ALSA chipsets to operate simultaneously. Then I worked on to bring a stable version of lportal-1.1, and hacked MFserver to stream video from a PC over the network to a PPC-based PVR device (Maximum T-8000). And learning the basics of git in the meanwhile! :) Lots of fun. My testbench was Sabayon-4 with Linux kernel 2.6.27, and had to switch from kernel ALSA to a newer version to get it working properly. After learning a bit about ALSA, it boiled down to configuring /etc/modprobe.d/alsa to define the card indices and their driver. I have a setup with integrated Intel audio which has altogether 5 analog 3.5" stereo audio plugs and a S/PDIF connector .. on the motherboard. I just today got a connector card for this, but I already had an M-AUDIO Audiophile 2496 that has a coax S/PDIF output available. I connected this with a cheap 1 m single RCA coax cable to Pioneer stereo system. After all the work of compiling ALSA headers for the correct kernel and hassling with the kernel modules, I got both cards working simultaneously. I could play the same audio file in two different processes and send the output to analog and digital simultaneously. Both input sources are selected by the "CD" switch on the amplifier, and a separate analog/digital button is available to select the source. Cool! To my ears it seems that the digital is crisp and clear, but suffers from constant static cracles during some tracks. Analog source is a bit muddier, but the dynamic range is somehow more pleasant for me, so I left the analog device the default output. I decided to use ~/.asoundrc to set the default output device: To set the Audiophile's digital output:
pcm.!default iec958:M2496
Or the integrated Intel analog:
pcm.!default front:Intel
Speaker-test is a good testing tool:
$ speaker-test -c2 -Diec958:CARD=M2496,DEV=0
 $ speaker-test -c2 -Dfront:CARD=Intel
I use Amarok 2 to play music, using Phonon and KDE-4.2.1. Works fine.