I have a simple boost.asio
server which I am trying to run it on port 80
. I am running the code inside a try-catch
and I get a " bind
" exception error. The value of boost::error_code
is 13 which I think is "access denied".
I am running the code from Xcode
on Mac
running Yosemite
. I also tried to run Xcode
with sudo.
How can I fix this issue ?
Run as root.
The problem is that you don't have the permission to bind to a privileged port (<1024 on most systems).
If you're certain that the child process of Xcode runs as root, find out which process is already listening on port 80 ( lsof
and netstat
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.