😞 I was happy that Metasploit got an update after long time. After updating it just won't start. Error: https://forums.freebsd.org/attachments/msfconsole-error-jpg.18851/ < screenshot of error i posted on forum. Error message in text below. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| dice@chibacity:~ % msfconsole Could not find compatible versions Because every version of sinatra depends on rack >= 3.0.0, < 4 and every version of thin depends on rack >= 1, < 3, every version of sinatra is incompatible with thin >= 0. And because every version of metasploit-framework depends on thin >= 0, every version of sinatra is incompatible with metasploit-framework >= 0. So, because every version of metasploit-framework depends on sinatra >= 0 and Gemfile depends on metasploit-framework >= 0, version solving has failed. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| i am not the only one, it doesn't work on any one's PC
seems like sirDice was able to fix it somehow , see his post here : https://forums.FreeBSD.org/threads/i-updated-the-metasploit-framework-and-it-doesnt-open-anymore.93188/post-652490 . I posted this , thinking it might help Devs to tackle the issue more efficiently.
I confirm the bug. Hopefully the maintainer is able to help. In the meantime I am also going to take a look to sirDice's solution.
Bug Acknowledged -- I see the form post regarding the quick fix with: rubygem-mini_portile2>=2.8.2:devel/rubygem-mini_portile2 \ Will test and submit a patch if everything tests out clean. Thanks for reporting!!!
I have tested sirDice's suggestion too and it worked for me as well.
Created attachment 250332 [details] Update Metasploit to 6.3.60 and address updated dependency requirements. Updating Metasploit from upstream 6.3.50 to 6.3.60 Adding updated dependencies for: rubygem-sinatra2>=0:www/rubygem-sinatra2 rubygem-mini_portile2>=2.8.2:devel/rubygem-mini_portile2
(In reply to Lorenzo Salvadore from comment #2) Thanks. (In reply to tanawts from comment #3) Thanks again.
(In reply to tanawts from comment #5) hello, I tried 'pkg update and then pkg upgrade' but there's not Metasploit update shown and the error still remains. I don't have a port but a stable package installed. (In reply to Lorenzo Salvadore from comment #4) hello, do you have port or package of Metasploit?
@d0wq92, you will have to be patient as someone with FreeBSD Commit level privileges will need to commit my patch to the main ports repo for replication. After that, you can perform sync your ports and update as needed. Details on working with ports and packages can be found in the FreeBSD Handbook. https://docs.freebsd.org/en/books/handbook/ports/#ports-using If you'd like to test the attached patch out yourself, after downloading it, you can apply the patch via: # cd /usr/ports/security/metasploit/ # patch -R < metasploit.diff Your make && make install && msfconsole commands should work after that.
(In reply to tanawts from comment #8) Ok, thanks.
(In reply to tanawts from comment #8) Have you tested the patch succesfully? I get the following error message when I try to start msfconsole, which must be due to the update (I had already tested the rest of the patch successfully): --- Could not find compatible versions Because every version of metasploit-framework depends on metasploit-payloads = 2.0.166 and metasploit-payloads = 2.0.166 could not be found in locally installed gems, metasploit-framework cannot be used. So, because Gemfile depends on metasploit-framework >= 0, version solving has failed. --- Also, if you update DISTVERSION you need to remove PORTREVISION.
Created attachment 250354 [details] Patch to address updated dependency requirements Adding updated dependencies for: rubygem-sinatra2>=0:www/rubygem-sinatra2 rubygem-mini_portile2>=2.8.2:devel/rubygem-mini_portile2
Thanks for the catch Lorenzo, got too greedy. I will submit a separate ticket & patch to handle the roll up for updating to 6.3.60 since it's going to affect dependent rubygems. The new patch should properly address d0wq92's bug appropriately. Thanks again!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6a4499516682ad70be53b7ed6d37c5502caa4f87 commit 6a4499516682ad70be53b7ed6d37c5502caa4f87 Author: Tanawts <tanawts@gmail.com> AuthorDate: 2024-05-03 15:24:58 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2024-05-03 15:31:33 +0000 security/metasploit: Fix crash at start Fix crash at start due to issues with dependencies: Could not find compatible versions Because every version of sinatra depends on rack >= 3.0.0, < 4 and every version of thin depends on rack >= 1, < 3, every version of sinatra is incompatible with thin >= 0. And because every version of metasploit-framework depends on thin >= 0, every version of sinatra is incompatible with metasploit-framework >= 0. So, because every version of metasploit-framework depends on sinatra >= 0 and Gemfile depends on metasploit-framework >= 0, version solving has failed. PR: 278534 Reported by: d0wq92 <dimoj30024@picdv.com> security/metasploit/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Committed, thanks! I have only added a PORTREVISION bump, which is required due to the changes in dependencies.