7

I am a relatively new Mac user (coming from a ubuntu/debian background) and have attempted to replace apt-get with macports "port" command. I've installed XCode and Macports successfully (my terminal recognises "sudo port install" command). However, no matter what I try install, no port seems to be found.

I attempted:

sudo port install mysql5-server and other requirements such as curl and gd.. I keep getting "port not found" error.

Where is macports looking and what could the problem be?

Blyde
  • 2,923
  • 2
  • 18
  • 16

2 Answers2

9

I had the same problem and I was very disappointed at that moment to solve the issue! but now it has worked for me!

At first, turn your "firewall" off and then try this command:

sudo port -d selfupdate

or equivalently this command:

sudo port -d sync

it will update the ports tree and after that, you'll be able to install with this nice command!

enjoy that!

mm49307
  • 2,490
  • 2
  • 19
  • 15
  • 1
    Had a similar problem when running via a VPN. Turning off the VPN for the `selfupdate` fixed the problem (individual ports can be installed/updated with the VPN on) – James Random Jan 19 '23 at 14:59
0

If this doesn't work:

sudo port install mysql5 +server

and you are just looking to install MySQL server you can download a compiled version from the MySQL site directly. They also have Workbench available as well. Not everything on the Mac needs to be built from source since most of the Macs have very similar hardware. http://www.mysql.com/downloads/mysql/#downloads

They do offer tar versions and DMGs as executables.

AbsoluteƵERØ
  • 7,816
  • 2
  • 24
  • 35
  • I get "Port mysql5 not found" – Blyde Apr 03 '13 at 15:21
  • It's not just mysql5 that gives me not found. I have actually installed MySQL through dmg and also have Workbench installed. I'm attempting to install all my php extensions (curl, gd and apc) – Blyde Apr 04 '13 at 08:40