If this is your first visit, be sure to
check out the Forum Rules by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Then i tried to connecting to msfconsole , but it gave me an error asshown below

#msfconsole

shell-init:error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init:error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init:error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
/opt/metasploit/msf3/lib/fastlib.rb:362:in 'pwd' : No such file or directory - getcwd (errno: : ENOENT)
from /opt/metasploit/msf3/lib/fastlib.rb:362: in '<mudle:Kernel>'
from /opt/metasploit/msf3/lib/fastlib.rb:355: in '<top (required)>'
from /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36: in 'require'
from /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36: in 'require'
from /opt/metasploit/msf3/msfconsole:18: in '<main>'

can anyone help or can anyone tell me how to update metasploit on BT5, if im doing it wrongly.

Re: BackTrack 5 cannot connect to msfconsole after updating

I think this was where you went wrong: "/opt/framework3#./uninstall". You don't ever need to uninstall, unless it's broken (which it now is for you ).

The current version of the framework is 4.x, not 3. It's path is /opt/metasploit/msf3, not /opt/framework3.

I would suggest purging/deleting every reference to metasploit you can find, whatever version, then "apt-get install metasploit". May be easier just to re-install BT5R3.

Once you have an intact version of metasploit, update simply by "msfupdate" from the BT menu, or from the msfconsole command-line.

I did what as sickness told me to do..and it works..now i can connect to msfconsole and it got updated, version is v4.0.0 now. But there is another issue now. I want to connect to mysql db. When i try db_driver under msfconsole i only get postgresql driver available. And there is another message that says " Enable the mysql driver with the following command: $gem install mysql and also to intall libmysqlclient-dev" I did both but still same thing happens, only postgresql is available and same message displayed.