错误内容:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Vers服务器托管网ions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SimpleHTTPServer.py", line 235, in
test()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SimpleHTTPServer.py", line 231, in test
BaseHTTPServer.test(HandlerClass, ServerClass)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 606, in test
httpd = ServerClass(server_address, HandlerClass)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 420, in __init__
self.server_bind()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 434, in server_bind
self.socket.bind(self.server_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 48] Address already in use
错误原因:mac测试网速端口被占用
解决方法:
1)在命令行输入【lsof -i port】,获取占用进程的pid。
#示例
lsof -i服务器托管网:8000
2)在命令行输入【kill -9 PID】,杀死进程。
#示例
kill -9 78191
3)在命令行输入【python -m SimpleHTTPServer】,即可运行
参考:
mac端口号被占用怎么解决_mac 端口占用-CSDN博客
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
相关推荐: Linux环境docker安装gitlab(简单粗暴,复制即用)
前言 为方便运维,本人将常用docker安装镜像方式总结如下: 一、安装gitlab 1.查询镜像 docker search gitlab 2.拉取镜像 可以根据自己需求拉取想要的版本,我选的是中文版 docker pull twang2218/gitlab…