Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Libraries missing while installing Oracle 11.2g on Oracle Linux 6.2

user8999602Apr 14 2012 — edited May 11 2012
Hi,

i just installed oracle linux 6.2 and started to isntall Oracle 11.2g server.
so first i installed the yum install oracle-rdbms-server-11gR2-preinstall_
but when i run the prerequisite check on OUI it shows some libraries missing. the issue is that the libraries are installed but the version doesn't match.

ex: when i query rpm -q libaio it shows that i have installed libaio-0.3.107 but in OUI it shows that libaio-0.3.105 is missing.

is this normal or should i go and install also the previous versions of the missing libraries?

Comments

_AZ_

i think i should elaborate that I do expect to receive only one row ( from the select). Anything more (or less) should be deemed an error.

Answer

Well, with the code you have above you *will* get an error: TypeError: 'NoneType' object is not iterable. The reason for that is that fetchone() returns None if there are no rows left to fetch. That error isn't too helpful, though. You will need to do something along these lines:

row = cursor.fetchone()

if row is None:

   raise Exception("Hey, only one row was returned!")

tim, val = row

You will want to replace the Exception message with something a bit more meaningful, of course!

Marked as Answer by _AZ_ · Sep 27 2020
_AZ_

thank you @Anthony . Is there a better approach that i should.could use ( vs fetchone or overall ) ?

You're welcome. That approach works and is reasoanble. If you want to check for too many rows as well, you can do fetchall() which will return an array and check the length of the array instead. If you're worried about getting back too many rows with fetchall() you can also use fetchmany(2) which will tell you if there are 0, 1, or 2 rows available.

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 8 2012
Added on Apr 14 2012
8 comments
78,784 views