python解压tgz出现OSError: [Errno 22] Invalid argument:

想用python批量解压tgz文件,简单试试但却遇到问题,代码如下
`
import tarfile

dectgzpath='20180601T000004Z-mlab1-yyz02-neubot-0000.tgz'
objpath='E:/test'

tar = tarfile.open(dectgzpath,'r:gz')
names = tar.getnames()
for name in names:
tar.extract(name, path=objpath)
tar.close()

出现这个错误
OSError: [Errno 22] Invalid argument: 'E:\\test\\2018\\06\\01\\20180601T00:00:04.216228008Z_dash.gz'
这个文件里面包含多层目录,我开始以为是要自己创建文件夹但我试过,并没有用,有没有大佬能够帮我看下,谢谢

2个回答

你的文件名里面有冒号,而文件名是不允许冒号的,你把它替换成减号、下划线等支持的字符,或者干脆去掉。

在windows操作系统里,冒号只能用于标记盘符,比如c: d:,而不许出现在文件名里。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
求解压tgz文件的解决方案
最近在做一个图像处理的项目,需要在程序里解压tgz文件,项目用的是vc实现的,请各位大神帮帮忙
node项目运行后提示错误信息ERR_HTTP_INVALID_HEADER_VALUE
我在运行node项目时提示运行错误 ``` D:\hichat>node app.js server on *:3000 _http_outgoing.js:475 throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); ^ TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-Type" at storeHeader (_http_outgoing.js:432:5) at processHeader (_http_outgoing.js:427:3) at ServerResponse._storeHeader (_http_outgoing.js:332:11) at ServerResponse.writeHead (_http_server.js:303:8) at D:\hichat\modules\StaticService.js:30:8 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3) { code: 'ERR_HTTP_INVALID_HEADER_VALUE' } ``` 网上找了很多,都没有找到相应的方法和出现的原因 ``` StaticService.js var fs = require("fs"),//内部模块 处理文件操作 path =require("path"),//内部模块 处理路径操作 mime =require("./mime").types;//自定义模块请求处理文档类型操作 /** * 404 NOT FOUNT 函数 * @param {[type]} res [请求对象] */ function send404(res){ res.writeHead(404,{"Content-Type":"text/plain"}); res.end("404 not found"); } /** * 静态文件请求函数 * @param {[type]} realpath [绝对路径] * @param {[type]} res [服务器请求对象] */ function staticServer(realpath,res){ fs.readFile(realpath,function(err,data){ if(!err){ var extname=path.extname(realpath); res.writeHead(200,{"Content-Type":mime[extname]}); //这行报错 res.end(data); }else{ send404(res); } }); } /** * 静态服务器主入口模块 * @param {[type]} pathname [请求路径名称] * @param {[type]} res [请求对象] * @param {[type]} base_dir [根目录] */ exports.staticRender=function(pathname,res,base_dir){ var reg = /^\/static|upload/;//目录匹配 if(reg.test(pathname)){ fs.exists(path.join(base_dir,pathname),function(exists){ if(exists){ staticServer(path.join(base_dir,pathname),res) }else{ send404(res); } }) }else{ send404(res); } } ``` ``` /** * title hichat聊天室 文件mime类型对象 */ exports.types = { '.hqx':'application/mac-binhex40', '.cpt':'application/mac-compactpro', '.csv':['text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'], '.bin':'application/macbinary', '.dms':'application/octet-stream', '.lha':'application/octet-stream', '.lzh':'application/octet-stream', '.exe':['application/octet-stream', 'application/x-msdownload'], '.class':'application/octet-stream', '.psd':'application/x-photoshop', '.so':'application/octet-stream', '.sea':'application/octet-stream', '.dll':'application/octet-stream', '.oda':'application/oda', '.pdf':['application/pdf', 'application/x-download'], '.ai':'application/postscript', '.eps':'application/postscript', '.ps':'application/postscript', '.smi':'application/smil', '.smil':'application/smil', '.mif':'application/vnd.mif', '.xls':['application/excel', 'application/vnd.ms-excel', 'application/msexcel'], '.ppt':['application/powerpoint', 'application/vnd.ms-powerpoint'], '.wbxml':'application/wbxml', '.wmlc':'application/wmlc', '.dcr':'application/x-director', '.dir':'application/x-director', '.dxr':'application/x-director', '.dvi':'application/x-dvi', '.gtar':'application/x-gtar', '.gz':'application/x-gzip', '.php':'application/x-httpd-php', '.php4':'application/x-httpd-php', '.php3':'application/x-httpd-php', '.phtml':'application/x-httpd-php', '.phps':'application/x-httpd-php-source', '.js':'application/x-javascript', '.swf':'application/x-shockwave-flash', '.sit':'application/x-stuffit', '.tar':'application/x-tar', '.tgz':['application/x-tar', 'application/x-gzip-compressed'], '.xhtml':'application/xhtml+xml', '.xht':'application/xhtml+xml', '.zip':['application/x-zip', 'application/zip', 'application/x-zip-compressed'], '.mid':'audio/midi', '.midi':'audio/midi', '.mpga':'audio/mpeg', '.mp2':'audio/mpeg', '.mp3':['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'], '.aif':'audio/x-aiff', '.aiff':'audio/x-aiff', '.aifc':'audio/x-aiff', '.ram':'audio/x-pn-realaudio', '.rm':'audio/x-pn-realaudio', '.rpm':'audio/x-pn-realaudio-plugin', '.ra':'audio/x-realaudio', '.rv':'video/vnd.rn-realvideo', '.wav':['audio/x-wav', 'audio/wave', 'audio/wav'], '.bmp':['image/bmp', 'image/x-windows-bmp'], '.gif':'image/gif', '.jpeg':['image/jpeg', 'image/pjpeg'], '.jpg':['image/jpeg', 'image/pjpeg'], '.jpe':['image/jpeg', 'image/pjpeg'], '.png':['image/png', 'image/x-png'], '.tiff':'image/tiff', '.tif':'image/tiff', '.css':'text/css', '.html':'text/html', '.htm':'text/html', '.shtml':'text/html', '.txt':'text/plain', '.text':'text/plain', '.log':['text/plain', 'text/x-log'], '.rtx':'text/richtext', '.rtf':'text/rtf', '.xml':'text/xml', '.xsl':'text/xml', '.mpeg':'video/mpeg', '.mpg':'video/mpeg', '.mpe':'video/mpeg', '.qt':'video/quicktime', '.mov':'video/quicktime', '.avi':'video/x-msvideo', '.movie':'video/x-sgi-movie', '.doc':'application/msword', '.docx':['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'], '.xlsx':['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'], '.word':['application/msword', 'application/octet-stream'], '.xl':'application/excel', '.eml':'message/rfc822', '.json':['application/json', 'text/json'] }; ```
ubuntu 安装配置c++的opencv 报错
我在ubuntu 上打算安装和配置c++的Opencv, 下载了opencv3.1.0版本的代码,然后也手动的下载了ippicv_linux_20151201.tgz。创建build文件夹后Cmake命令已经可以编译过去了。 但是在执行make命令的时候,经常会报错: ``` [ 15%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernels_core.cpp.o [ 15%] Linking CXX shared library ../../lib/libopencv_core.so /usr/bin/ld: CMakeFiles/opencv_core.dir/src/va_intel.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC CMakeFiles/opencv_core.dir/src/va_intel.cpp.o: 无法添加符号: 错误的值 collect2: error: ld returned 1 exit status modules/core/CMakeFiles/opencv_core.dir/build.make:1382: recipe for target 'lib/libopencv_core.so.3.1.0' failed make[2]: *** [lib/libopencv_core.so.3.1.0] Error 1 CMakeFiles/Makefile2:1420: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 ``` 有时候在33%进度的时候报这个错误,有时候就在15%时候报。我整整试了一整天,查遍了各种解决方法都无济于事。请大侠们帮忙解决下吧。跪谢。 是否有直接加载已经编译好的库的方式,可以快速实现配置,因为我急需要用Opencv实现代码。感谢各位大侠了。
有大佬帮忙看一下这个死锁怎么形成的吗
按道理主键+RR不会形成死锁啊 ``` InnoDB: * WE ROLL BACK TRANSACTION (1) InnoDB: * (2) WAITING FOR THIS LOCK TO BE GRANTED: InnoDB: * (2) HOLDS THE LOCK(S): InnoDB: * (2) TRANSACTION: InnoDB: InnoDB: * (1) WAITING FOR THIS LOCK TO BE GRANTED: InnoDB: Transactions deadlock detected, dumping detailed information. update examinees set token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9leGFtLmNvZGVwa3UuY29tXC9hcGlcL2V4YW1pbmVlXC9sb2dpbiIsImlhdCI6MTU3NjM3MjE4MCwiZXhwIjoxNjEyMzcyMTgwLCJuYmYiOjE1NzYzNzIxODAsImp0aSI6Im15TGZ6NmhqVFJzYTNjb1EiLCJzdWIiOjg4NCwicHJ2IjoiNDY3MGJjYmM4YzU5NTJjZTdmN2ExZjQ4OTliOTU0YzU1YjU2NDMyZCJ9.pIIe2xY-eh_3_HhUOURdj325sq9Od1koOVPlRKZ6hXM', login_count = 7, last_login_at = '2019-12-15 09:09:40', examinees.updated_at = '2019-12-15 09:09:40' where id = 884 1: len 6; hex 0000003d236f; asc =#o;; 5: len 15; hex 38353836343036304071712e636f6d; asc 85864060@qq.com;; 14: len 30; hex 68747470733a2f2f6578616d2d313235333338363431342e66696c652e6d; asc https://exam-1253386414.file.m; (total 92 bytes); 10: len 18; hex 343431333233323030383130303333343131; asc 441323200810033411;; 14: len 30; hex 68747470733a2f2f6578616d2d313235333338363431342e66696c652e6d; asc https://exam-1253386414.file.m; (total 92 bytes); RECORD LOCKS space id 301 page no 83 n bits 88 index PRIMARY of table exam.examinees trx id 4006767 lock_mode X locks rec but not gap waiting Record lock, heap no 12 PHYSICAL RECORD: n_fields 27; compact format; info bits 0 3: len 9; hex e69d8ee59bbde7909b; asc ;; 25: len 4; hex 5d68cbfc; asc ]h ;; 18: len 24; hex e883a1e88081e5b888e280ad203135333237323433333934; asc 15327243394;; 7: len 30; hex 24327924313024526e656676315a48716755427072383455456c71732e45; asc $2y$10$Rnefv1ZHqgUBpr84UElqs.E; (total 60 bytes); mysql tables in use 1, locked 1 LOCK WAIT 19 lock struct(s), heap size 1136, 8 row lock(s), undo log entries 224 3: len 6; hex e69cb1e888aa; asc ;; 7: len 30; hex 243279243130247756783376524c2e38756457306945644f6e5061734f53; asc $2y$10$wVx3vRL.8udW0iEdOnPasOS; (total 60 bytes); * (1) TRANSACTION: 0: len 4; hex 00000374; asc t;; 13: len 0; hex ; asc ;; 22: len 4; hex 00000008; asc ;; 23: len 4; hex 5df58817; asc ] ;; Record lock, heap no 19 PHYSICAL RECORD: n_fields 27; compact format; info bits 0 8: len 1; hex 01; asc ;; 18: len 24; hex e883a1e88081e5b888e280ad203135333237323433333934; asc 15327243394;; 11: len 1; hex 81; asc ;; 13: len 0; hex ; asc ;; 16: len 1; hex 81; asc ;; 20: len 4; hex 00000000; asc ;; 22: len 4; hex 00000004; asc ;; 24: SQL NULL; 6: len 11; hex 3133383032353838323832; asc 13802588282;; 21: len 30; hex 65794a30655841694f694a4b563151694c434a68624763694f694a49557a; asc eyJ0eXAiOiJKV1QiLCJhbGciOiJIUz; (total 337 bytes); 24: SQL NULL; TRANSACTION 4006767, ACTIVE 1426 sec starting index read 19: len 4; hex 00000013; asc ;; RECORD LOCKS space id 301 page no 28 n bits 88 index PRIMARY of table exam.examinees trx id 4005686 lock_mode X locks rec but not gap waiting Record lock, heap no 19 PHYSICAL RECORD: n_fields 27; compact format; info bits 0 MySQL thread id 10516222, OS thread handle 139667263854336, query id 300969200 *.190 exam updating 10: len 18; hex 343431333233323030383130303333343131; asc 441323200810033411;; 11: len 1; hex 81; asc ;; 12: len 4; hex 00000000; asc ;; 16: len 1; hex 81; asc ;; mysql tables in use 1, locked 1 MySQL thread id 10520696, OS thread handle 139667256985344, query id 301142683 *.190 exam updating 26: len 4; hex 5df58817; asc ] ;; 3: len 6; hex e69cb1e888aa; asc ;; 13: len 0; hex ; asc ;; 10: len 18; hex 343430333034323030383032303230343334; asc 440304200802020434;; 12: len 4; hex 00000000; asc ;; 17: len 1; hex 01; asc ;; 15: len 10; hex 323030382d31302d3033; asc 2008-10-03;; 19: len 4; hex 00000013; asc ;; 20: len 4; hex 00000000; asc ;; 7: len 30; hex 243279243130247756783376524c2e38756457306945644f6e5061734f53; asc $2y$10$wVx3vRL.8udW0iEdOnPasOS; (total 60 bytes); 9: len 30; hex 5b2268747470733a5c2f5c2f6578616d2d313235333338363431342e6669; asc ["https://exam-1253386414.fi; (total 205 bytes); 28 lock struct(s), heap size 3520, 28 row lock(s), undo log entries 1850 26: len 4; hex 5df58817; asc ] ;; 23: len 4; hex 5df5863f; asc ] ?;; 17: len 1; hex 02; asc ;; 26: len 4; hex 5df5863f; asc ] ?;; RECORD LOCKS space id 301 page no 28 n bits 88 index PRIMARY of table exam.examinees trx id 4006767 lock_mode X locks rec but not gap 0: len 4; hex 00000374; asc t;; 4: len 9; hex e69e97e7bfa0e78fa0; asc ;; 15: len 10; hex 323030382d30322d3032; asc 2008-02-02;; TRANSACTION 4005686, ACTIVE 1709 sec starting index read 2: len 7; hex 29000001cf11da; asc ) ;; 8: len 1; hex 01; asc ;; 4: len 9; hex e69e97e7bfa0e78fa0; asc ;; 5: len 15; hex 38353836343036304071712e636f6d; asc 85864060@qq.com;; 9: len 30; hex 5b2268747470733a5c2f5c2f6578616d2d313235333338363431342e6669; asc ["https://exam-1253386414.fi; (total 205 bytes); 18: len 24; hex e883a1e88081e5b888e280ad203135333237323433333934; asc 15327243394;; 6: len 11; hex 3138313239393331303638; asc 18129931068;; 14: len 30; hex 68747470733a2f2f6578616d2d313235333338363431342e66696c652e6d; asc https://exam-1253386414.file.m; (total 92 bytes); update examinees set token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9leGFtLmNvZGVwa3UuY29tXC9hcGlcL2V4YW1pbmVlXC9sb2dpbiIsImlhdCI6MTU3NjM3MzQ1NCwiZXhwIjoxNjEyMzczNDU0LCJuYmYiOjE1NzYzNzM0NTQsImp0aSI6IlhXWmZNSUdNTjVLSTd6U0kiLCJzdWIiOjE2MjYsInBydiI6IjQ2NzBiY2JjOGM1OTUyY2U3ZjdhMWY0ODk5Yjk1NGM1NWI1NjQzMmQifQ.zUGTJnfnGREKzbkASKjVtPVaac_3bMXXUVuDs7vdDKE', login_count = 4, last_login_at = '2019-12-15 09:30:54', examinees.updated_at = '2019-12-15 09:30:54' where id = 1626 1: len 6; hex 0000003d236f; asc =#o;; 2: len 7; hex 29000001cf11da; asc ) ;; 25: len 4; hex 5d68cbfc; asc ]h ;; 6: len 11; hex 3138313239393331303638; asc 18129931068;; 15: len 10; hex 323030382d31302d3033; asc 2008-10-03;; 23: len 4; hex 5df58817; asc ] ;; 0: len 4; hex 0000065a; asc Z;; 11: len 1; hex 81; asc ;; 12: len 4; hex 00000000; asc ;; 15: len 10; hex 323030382d31302d3033; asc 2008-10-03;; 23: len 4; hex 5df58817; asc ] ;; 0: len 4; hex 0000065a; asc Z;; 9: len 30; hex 5b2268747470733a5c2f5c2f736372617463682d776f726b732d31323533; asc ["https://scratch-works-1253; (total 215 bytes); 21: len 30; hex 65794a30655841694f694a4b563151694c434a68624763694f694a49557a; asc eyJ0eXAiOiJKV1QiLCJhbGciOiJIUz; (total 337 bytes); 16: len 1; hex 81; asc ;; 21: len 30; hex 65794a30655841694f694a4b563151694c434a68624763694f694a49557a; asc eyJ0eXAiOiJKV1QiLCJhbGciOiJIUz; (total 339 bytes); 17: len 1; hex 01; asc ;; 4: len 6; hex e983ade99c9e; asc ;; 5: len 15; hex 31323038383438374071712e636f6d; asc 12088487@qq.com;; 19: len 4; hex 00000013; asc ;; 24: SQL NULL; 2: len 7; hex 38000001a3284a; asc 8 (J;; 20: len 4; hex 00000000; asc ;; 25: len 4; hex 5dea312c; asc ] 1,;; ```
解压tgz文件怎么获取进度 获取进度的方法
求大神指点 JAVA 解压tar.gz文件怎么获取进度? 获取进度的方法
npm安装依赖包报128错误
![控制台报错](https://img-ask.csdn.net/upload/201706/20/1497951759_836689.png) 日志: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Users\\qinwy\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'install', 1 verbose cli '--save' ] 2 info using npm@5.0.3 3 info using node@v6.11.0 4 verbose npm-session 74296ddf7f070f99 5 silly install runPreinstallTopLevelLifecycles 6 silly preinstall app@1.0.0 7 info lifecycle app@1.0.0~preinstall: app@1.0.0 8 silly lifecycle app@1.0.0~preinstall: no script for preinstall, continuing 9 silly install loadCurrentTree 10 silly install readLocalPackageData 11 silly install loadIdealTree 12 silly install cloneCurrentTreeToIdealTree 13 silly install loadShrinkwrap 14 silly pacote trying https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz by hash: sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw== 15 silly pacote https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz extracted to C:\Users\qinwy\AppData\Local\Temp\npm-5380-30980156\unpack-f8d560a0 by content address 2509ms 16 silly addBundled read tarball 17 silly cleanup remove extracted module 18 http fetch GET 304 http://registry.npm.taobao.org/jspdf/download/jspdf-1.3.3.tgz 327ms (from cache) 19 silly pacote remote manifest for jspdf@http://registry.npm.taobao.org/jspdf/download/jspdf-1.3.3.tgz fetched in 384ms 20 silly fetchPackageMetaData error for adler32cs@git+https://github.com/chick307/adler32cs.js.git#master exited with error code: 128 21 verbose stack Error: exited with error code: 128 21 verbose stack at ChildProcess.onexit (C:\Users\qinwy\AppData\Roaming\npm\node_modules\npm\node_modules\mississippi\node_modules\end-of-stream\index.js:39:36) 21 verbose stack at emitTwo (events.js:106:13) 21 verbose stack at ChildProcess.emit (events.js:191:7) 21 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 22 verbose cwd F:\works\kudai_person\app 23 verbose Windows_NT 10.0.14393 24 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\qinwy\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" 25 verbose node v6.11.0 26 verbose npm v5.0.3 27 error exited with error code: 128 28 verbose exit [ 1, true ]
openwrt 编译失败,无法下载mbedtls-1-3-11-gpl-tgz
solving polarssl.org (polarssl.org)... 79.170.91.36 Connecting to polarssl.org (polarssl.org)|79.170.91.36|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://tls.mbed.org/download/mbedtls-1.3.11-gpl.tgz [following] --2015-06-11 01:39:41-- https://tls.mbed.org/download/mbedtls-1.3.11-gpl.tgz Resolving tls.mbed.org (tls.mbed.org)... 79.170.91.36 Connecting to tls.mbed.org (tls.mbed.org)|79.170.91.36|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1731809 (1.7M) [application/x-gzip] Saving to: 'STDOUT' 20% [=======> ] 360,408 17.7KB/s in 21s 2015-06-11 01:40:06 (17.1 KB/s) - Connection closed at byte 360408. Retrying. --2015-06-11 01:40:07-- (try: 2) https://tls.mbed.org/download/mbedtls-1.3.11-gpl.tgz Connecting to tls.mbed.org (tls.mbed.org)|79.170.91.36|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1731809 (1.7M) [application/x-gzip] Saving to: 'STDOUT' 32% [===========> ] 555,968 30.5KB/s in 22s 2015-06-11 01:40:32 (24.6 KB/s) - Connection closed at byte 555968. Retrying. --2015-06-11 01:40:34-- (try: 3) https://tls.mbed.org/download/mbedtls-1.3.11-gpl.tgz Connecting to tls.mbed.org (tls.mbed.org)|79.170.91.36|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1731809 (1.7M) [application/x-gzip] Saving to: 'STDOUT' 32% [===========> ] 555,968 26.6KB/s in 22s 2015-06-11 01:40:58 (24.6 KB/s) - Connection closed at byte 555968. Retrying. --2015-06-11 01:41:01-- (try: 4) https://tls.mbed.org/download/mbedtls-1.3.11-gpl.tgz Connecting to tls.mbed.org (tls.mbed.org)|79.170.91.36|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1731809 (1.7M) [application/x-gzip] Saving to: 'STDOUT' 30% [==========> ] 524,224 23.9KB/s in 22s 2015-06-11 01:41:24 (23.0 KB/s) - Connection closed at byte 555968. Retrying. --2015-06-11 01:41:28-- (try: 5) https://tls.mbed.org/download/mbedtls-1.3.11-gpl.tgz Connecting to tls.mbed.org (tls.mbed.org)|79.170.91.36|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1731809 (1.7M) [application/x-gzip] Saving to: 'STDOUT' 26% [=========> ] 457,680 21.7KB/s in 24s 2015-06-11 01:41:54 (18.5 KB/s) - Connection closed at byte 555968. Giving up. Download failed. --2015-06-11 01:41:54-- http://mirror2.openwrt.org/sources/mbedtls-1.3.11-gpl.tgz Resolving mirror2.openwrt.org (mirror2.openwrt.org)... 46.4.11.11 Connecting to mirror2.openwrt.org (mirror2.openwrt.org)|46.4.11.11|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2015-06-11 01:41:55 ERROR 404: Not Found. Download failed. --2015-06-11 01:41:55-- http://downloads.openwrt.org/sources/mbedtls-1.3.11-gpl.tgz Resolving downloads.openwrt.org (downloads.openwrt.org)... 78.24.191.177 Connecting to downloads.openwrt.org (downloads.openwrt.org)|78.24.191.177|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2015-06-11 01:41:56 ERROR 404: Not Found. Download failed. No more mirrors to try - giving up. make[3]: *** [/home/hand1234/openwrt/trunk/dl/mbedtls-1.3.11-gpl.tgz] Error 2 make[3]: Leaving directory `/home/hand1234/openwrt/trunk/package/libs/polarssl' make[2]: *** [package/libs/polarssl/compile] Error 2 make[2]: Leaving directory `/home/hand1234/openwrt/trunk' make[1]: *** [/home/hand1234/openwrt/trunk/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/hand1234/openwrt/trunk' make: *** [world] 错误 2
使用spark自带的sbt编译工具打包失败
小菜目前刚学spark,安装spark的操作系统环境是ubuntu 12.0.4。安装的scala是scala-2.9.1.final.tgz。配置好环境变量后,通过git clone git://github.com/aparch/spark.git下载spark源代码后,执行命令sbt/sbt update complie,出现信息如下: NOTE: The sbt/sbt script has been relocated to build/sbt. Please update references to point to the new location. Invoking 'build/sbt update compile' now ... /root/spark/build/sbt-launch-lib.bash: line 84: java: command not found 查了半天不知道是什么原因,恳请各位大侠帮忙看看。
java环境下ckfinder,上传图片时,部分图片提示 由于文件系统的限制,该请求不能完成
**1.问题:** ** java**下的ckfinder **上传部分图片**时报 由于文件系统的限制,该请求不能完成。一部分图片可以上传成功,另外一部分报错 **2.ckfinder.xml ** ``` <config> <enabled>true</enabled> <baseDir></baseDir> <baseURL>/userfiles/</baseURL> <licenseKey></licenseKey> <licenseName></licenseName> <imgWidth>2000</imgWidth> <imgHeight>2000</imgHeight> <imgQuality>80</imgQuality> <uriEncoding>UTF-8</uriEncoding> <forceASCII>false</forceASCII> <disallowUnsafeCharacters>false</disallowUnsafeCharacters> <userRoleSessionVar>CKFinder_UserRole</userRoleSessionVar> <checkDoubleExtension>true</checkDoubleExtension> <checkSizeAfterScaling>true</checkSizeAfterScaling> <secureImageUploads>true</secureImageUploads> <htmlExtensions>html,htm,xml,js</htmlExtensions> <hideFolders> <folder>.*</folder> <folder>CVS</folder> </hideFolders> <hideFiles> <file>.*</file> </hideFiles> <defaultResourceTypes></defaultResourceTypes> <types> <type name="files"> <url>%BASE_URL%files/</url> <directory>%BASE_DIR%files</directory> <maxSize>400M</maxSize> <allowedExtensions>7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip</allowedExtensions> <deniedExtensions></deniedExtensions> </type> <type name="images"> <url>%BASE_URL%images/</url> <directory>%BASE_DIR%images</directory> <maxSize>400M</maxSize> <allowedExtensions>bmp,gif,jpeg,jpg,png</allowedExtensions> <deniedExtensions></deniedExtensions> </type> <type name="flash"> <url>%BASE_URL%flash/</url> <directory>%BASE_DIR%flash</directory> <maxSize>400M</maxSize> <allowedExtensions>swf,flv</allowedExtensions> <deniedExtensions></deniedExtensions> </type> <type name="resfile"> <url>%BASE_URL%resfile/</url> <directory>%BASE_DIR%resfile</directory> <maxSize>400M</maxSize> <allowedExtensions>swf,flv,pdf,xls,xlsx,mp4</allowedExtensions> <deniedExtensions></deniedExtensions> </type> </types> <accessControls> <accessControl> <role>*</role> <resourceType>*</resourceType> <folder>/</folder> <folderView>true</folderView> <folderCreate>true</folderCreate> <folderRename>true</folderRename> <folderDelete>true</folderDelete> <fileView>true</fileView> <fileUpload>true</fileUpload> <fileRename>true</fileRename> <fileDelete>true</fileDelete> </accessControl> </accessControls> <thumbs> <enabled>true</enabled> <url>%BASE_URL%_thumbs/</url> <directory>%BASE_DIR%_thumbs</directory> <directAccess>true</directAccess> <maxWidth>550</maxWidth> <maxHeight>310</maxHeight> <quality>80</quality> </thumbs> <plugins> <plugin> <name>imageresize</name> <class>com.ckfinder.connector.plugins.ImageResize</class> <params> <param name="smallThumb" value="90x90"></param> <param name="mediumThumb" value="120x120"></param> <param name="largeThumb" value="180x180"></param> </params> </plugin> <plugin> <name>fileeditor</name> <class>com.ckfinder.connector.plugins.FileEditor</class> <params></params> </plugin> </plugins> <basePathBuilderImpl>com.ckfinder.connector.configuration.ConfigurationPathBuilder</basePathBuilderImpl> </config> ``` 3.截图,上传失败 ![图片说明](https://img-ask.csdn.net/upload/201908/05/1564989151_68525.jpg) 截图,上传成功 ![图片说明](https://img-ask.csdn.net/upload/201908/05/1564989400_818875.jpg)
cnpm install执行时,出现Error [ERR_STREAM_WRITE_AFTER_END]
近期在安装vue的整套环境,结果在最后一步拉取依赖文件时出现了Error [ERR_STREAM_WRITE_AFTER_END] 下面我说明下安装步骤: 1. 安装nodejs,确定成功装了node和npm,两者的版本分别是v10.15.3和v6.4.1 2. 安装淘宝镜像(因为我直接访问国外服务器,是一直timeout的),确定cnpm成功安装 3. 安装electron,确定成功装了,版本是v4.1.4 4. 安装vue 5. 创建个脚手架(模板) 6. 拉取依赖文件到node_modules,好吧,到[54/58]时挂了,error了。 有谁有遇到过类似的问题吗,请各位大神指点啊。 以下是第6步操作出的error内容: ``` Error [ERR_STREAM_WRITE_AFTER_END]: write after end (writeStream "error") (writeStream "error"), GET https://cdn.npm.taobao.org/app-builder-bin/-/app-builder-bin-2.6.4.tgz 200 (connected: true, keepalive socket: false, agent status: {"createSocketCount":70,"createSocketErrorCount":0,"closeSocketCount":68,"errorSocketCount":0,"timeoutSocketCount":4,"requestCount":2463,"freeSockets":{},"sockets":{"cdn.npm.taobao.org:443::::::::true::::::::":2},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 1) headers: {"server":"Tengine","content-type":"application/octet-stream","content-length":"34353169","connection":"keep-alive","date":"Wed, 10 Apr 2019 03:51:22 GMT","x-oss-request-id":"5CAD683AB1E9EC94B380C4A0","accept-ranges":"bytes","etag":"\"52CE328FB03990A3D297D6A5B1088B9E\"","last-modified":"Tue, 26 Feb 2019 07:41:51 GMT","x-oss-object-type":"Normal","x-oss-hash-crc64ecma":"34131763972269000","x-oss-storage-class":"Standard","cache-control":"max-age=0, s-maxage=86400","x-oss-server-time":"205","age":"172947","ali-swift-global-savetime":"1554868282","x-cache":"HIT TCP_MEM_HIT dirn:11:298812429 mlen:0","x-swift-savetime":"Wed, 10 Apr 2019 03:51:22 GMT","x-swift-cachetime":"194318","via":"cache2.cn1414[0,206-0,H], cache5.cn1414[1,0]","timing-allow-origin":"*","eagleid":"af061d9915550412296928509e"} at writeAfterEnd (_stream_writable.js:243:12) at WriteStream.Writable.write (_stream_writable.js:291:5) at IncomingMessage.ondata (_stream_readable.js:689:20) at IncomingMessage.emit (events.js:189:13) at addChunk (_stream_readable.js:284:12) at readableAddChunk (_stream_readable.js:265:11) at IncomingMessage.Readable.push (_stream_readable.js:220:10) at HTTPParser.parserOnBody (_http_common.js:122:22) at TLSSocket.socketOnData (_http_client.js:442:20) at TLSSocket.emit (events.js:189:13) ``` 再附个截图:
npm时总是报错,不能Install东西,请问这是怎么了?
F:\nodework\demo\day5>npm install ejs npm ERR! fetch failed http://r.cnpmjs.org/ejs/download/ejs-2.5.6.tgz npm WARN retry will retry, error on last attempt: Error: unable to verify the first certificate npm ERR! fetch failed http://r.cnpmjs.org/ejs/download/ejs-2.5.6.tgz npm WARN retry will retry, error on last attempt: Error: unable to verify the first certificate npm ERR! fetch failed http://r.cnpmjs.org/ejs/download/ejs-2.5.6.tgz npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ejs" npm ERR! node v6.11.0 npm ERR! npm v3.10.10 npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE npm ERR! unable to verify the first certificate npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! F:\nodework\demo\day5\npm-debug.log
php配置libevent扩展的相关问题
php上配置libevent扩展,网上教程说将libevent0.1.0.tgz解压后执行./configure,但下载的包解压后都没有configure文件,没有办法按照该命令安装,该怎么解决?
window下压缩的tar文件 linux解压失败。
先从linux系统下载tar文件 window解压后无论有没有过变更只要再次压缩回去上传到linux解压就失败。 windows是7zip先压缩成tar。再压缩成tgz。 linux使用的C++代码解压。 ![图片说明](https://img-ask.csdn.net/upload/201902/14/1550123707_782023.jpg)
linux执行source /etc/profile时出现如下情况
declare -x CLASSPATH=".:/usr/local/java/jdk1.8.0_191//lib/dt.jar:/usr/local/java/jdk1.8.0_191//lib/tools.jar:/usr/local/java/jdk1.8.0_191/jre//lib:.:/usr/local/java/jdk1.8.0_191//lib/dt.jar:/usr/local/java/jdk1.8.0_191//lib/tools.jar:/usr/local/java/jdk1.8.0_191/jre//lib:" declare -x DISPLAY="localhost:10.0" declare -x HADOOP_HOME="/usr/local/hadoop/hadoop-2.8.5/" declare -x HISTCONTROL="ignoredups" declare -x HISTSIZE="1000" declare -x HIVE_HOME="/usr/local/hive" declare -x HOME="/root" declare -x HOSTNAME="hadoop01" declare -x JAVA_HOME="/usr/local/java/jdk1.8.0_191/" declare -x JRE_HOME="/usr/local/java/jdk1.8.0_191/jre/" declare -x LANG="zh_CN.UTF-8" declare -x LESSOPEN="||/usr/bin/lesspipe.sh %s" declare -x LOGNAME="root" declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:" declare -x MAIL="/var/spool/mail/root" declare -x OLDPWD="/root" declare -x PATH="/usr/local/hive/bin:/usr/local/hive/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/java/jdk1.8.0_191//bin:/usr/local/hadoop/hadoop-2.8.5//bin:/usr/local/hadoop/hadoop-2.8.5//sbin::/root/bin:/usr/local/java/jdk1.8.0_191//bin:/usr/local/java/jdk1.8.0_191/jre//bin:/usr/local/hadoop/hadoop-2.8.5//bin:/usr/local/hadoop/hadoop-2.8.5//sbin:" declare -x PWD="/usr/local/hadoop/hadoop-2.8.5" declare -x SELINUX_LEVEL_REQUESTED="" declare -x SELINUX_ROLE_REQUESTED="" declare -x SELINUX_USE_CURRENT_RANGE="" declare -x SHELL="/bin/bash" declare -x SHLVL="1" declare -x SSH_CLIENT="192.168.240.1 52834 22" declare -x SSH_CONNECTION="192.168.240.1 52834 192.168.240.131 22" declare -x SSH_TTY="/dev/pts/0" declare -x TERM="xterm" declare -x USER="root" declare -x XDG_DATA_DIRS="/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share" declare -x XDG_RUNTIME_DIR="/run/user/0" declare -x XDG_SESSION_ID="1"
关于java的GZip解压问题
视频系统,关系各终端的播放日志,采用的是定期向服务器上传tar.gz包,然后在服务器上解开,逐条读取放到数据库中。 问题:以前服务器用的是linux系统,解压文件是调用的系统命令tar来解压的,现在因为部分系统要部署到window或苹果上,所以改为用java自己的包来解压。这下出问题了,本来只有三行的记录,解出来之后有四行,第一行的前面是文件名和系统中的很多信息,然后是文件内容,中间隔的是乱码,下载到windows上用文本编辑器打到,,好像中间隔的是空格,用客户端软件ssh到linux上,用vi看,是一个个类似^@样的乱码,然而用正则表达式匹配却不行。 实际数据: 一个tar包,里面是一个log文件,内容是: \factory\film\真实的谎言\huangyan.vob,2000-01-01 20:43:32,2000-01-01 20:43:39 \factory\film\指环王\zhihuanwang.vob,2000-01-01 22:50:24,2000-01-01 22:50:29 用系统命令的方法,一切正常,但是用GZip的包来解,内容就是这样的: 00e04c0000ba_2001-03-06.log 0100755 0000000 0000000 00000003036 07251305477 013102\factory\film\真实的谎言\huangyan.vob,2000-01-01 20:43:32,2000-01-01 20:43:39 \factory\film\指环王\zhihuanwang.vob,2000-01-01 22:50:24,2000-01-01 22:50:29 真实文件的前面,是文件名以及后面很多不知道是什么信息的信息,最后还有一行,我想用拷贝粘贴的方法,但是粘不出来,不知道为什么。 请问是不是GZIPInputStream或GZIPOutputStream有什么参数?为什么他们解压后有这么多冗余的数据?如何去掉? 谢谢!不好意思,就这点分了 [b]问题补充:[/b] 这是文件,如果能用Gzip解压后的文件与用winzip 或winrar解压后的文件一致,就说明正确了 [b]问题补充:[/b] 文件后缀名为tgz,请修改修改成tgz,当然压缩算法是一样的,我上传文件不行,只能改为gz才能上传成功 [b]问题补充:[/b] 有的朋友说格式不对,但是为什么用winrar或linux的系统命令解压之后的文件内容正常,但是用java的gzip包却多出了很多内容?这是为什么?至少应该结果相同吧? [b]问题补充:[/b] 用客户端工具压缩之后,再用gzip的包解压,网上的大多程序都能做到正确解压,我得到的是数字电视的机顶盒所上传的日志文件,因为是不同公司之后开发的,所以很难联调,也不清楚具体是用什么压缩的,应该是用linux的命令压缩的 [b]问题补充:[/b] [color=red]因为我上传的文件格式不支持,所以我是修改了后缀名才上传成功的,下载后请修改成为*.tgz,而不是gz[/color] [b]问题补充:[/b] [color=red]根据后缀名来判断,并不是bz2压缩,也许是在包中含了别的信息,但是有一点很奇怪:为什么用系统命令解压或用工具解压,都没有这些信息呢?为什么用GZip还解压,就会有呢?这是为什么?[/color]
新网VPS没有绑定域名 不能通过ip访问?
新网vps, redhat, apache ssh没有问题,防火墙设置把所有的都关掉了(用setup命令操作的) **没有绑定域名,因为域名还没选好** netstat也查过了,两个端口都在 netstat -tulpn | grep :80 netstat -tulpn | grep :8080 ssh 后,使用下面这个命令可以得到index.html中的内容, GET http://我的ip/index.html GET http://我的ip:8080/index.html (启动的另一个apache instance,端口设置为8080) 但是浏览器中输入http://我的ip/index.html 就没有反应 请问Linux和apache配置方面还有什么要注意的? 是不是新网、ISP提供商禁止了ip方式访问?(因为我看到国内外论坛上都提到过服务商会吧IP问80端口禁止) 下面是httpd.conf # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.2/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> # for a discussion of each configuration directive. # # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "/etc/httpd" will be interpreted by the # server as "/etc/httpd/logs/foo.log". # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # Don't give away too much information about all the subcomponents # we are running. Comment out this line if you don't mind remote sites # finding out what major optional modules you are running ServerTokens OS # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # ServerRoot "/etc/httpd" # # PidFile: The file in which the server should record its process # identification number when it starts. # PidFile run/httpd.pid # # Timeout: The number of seconds before receives and sends time out. # Timeout 120 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 ## ## Server-Pool Size Regulation (MPM specific) ## # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # ServerLimit: maximum value for MaxClients for the lifetime of the server # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 </IfModule> # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule worker.c> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # #Listen 12.34.56.78:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule auth_basic_module modules/mod_auth_basic.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule authn_file_module modules/mod_authn_file.so LoadModule authn_alias_module modules/mod_authn_alias.so LoadModule authn_anon_module modules/mod_authn_anon.so LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule ldap_module modules/mod_ldap.so LoadModule authnz_ldap_module modules/mod_authnz_ldap.so LoadModule include_module modules/mod_include.so LoadModule log_config_module modules/mod_log_config.so LoadModule logio_module modules/mod_logio.so LoadModule env_module modules/mod_env.so LoadModule ext_filter_module modules/mod_ext_filter.so LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule expires_module modules/mod_expires.so LoadModule deflate_module modules/mod_deflate.so LoadModule headers_module modules/mod_headers.so LoadModule usertrack_module modules/mod_usertrack.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule mime_module modules/mod_mime.so LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule info_module modules/mod_info.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so LoadModule actions_module modules/mod_actions.so LoadModule speling_module modules/mod_speling.so LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule cache_module modules/mod_cache.so LoadModule suexec_module modules/mod_suexec.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule cgi_module modules/mod_cgi.so LoadModule version_module modules/mod_version.so # # The following modules are not loaded by default: # #LoadModule cern_meta_module modules/mod_cern_meta.so #LoadModule asis_module modules/mod_asis.so # # Load config files from the config directory "/etc/httpd/conf.d". # Include conf.d/*.conf # # ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # #ExtendedStatus On # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! # User apache Group apache ### Section 2: 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All of these directives may appear inside <VirtualHost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin root@localhost # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName www.example.com:80 # eric add ServerName 我的ip!!!! # eric add end # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/html" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # <Directory /> Options FollowSymLinks AllowOverride None </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # <Directory "/var/www/html"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all #Deny from all </Directory> # # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. # # The path to the end user account 'public_html' directory must be # accessible to the webserver userid. This usually means that ~userid # must have permissions of 711, ~userid/public_html must have permissions # of 755, and documents contained therein must be world-readable. # Otherwise, the client will only receive a "403 Forbidden" message. # # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden # <IfModule mod_userdir.c> # # UserDir is disabled by default since it can confirm the presence # of a username on the system (depending on home directory # permissions). # UserDir disable # # To enable requests to /~user/ to serve the user's public_html # directory, remove the "UserDir disable" line above, and uncomment # the following line instead: # #UserDir public_html </IfModule> # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # #<Directory /home/*/public_html> # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # <Limit GET POST OPTIONS> # Order allow,deny # Allow from all # </Limit> # <LimitExcept GET POST OPTIONS> # Order deny,allow # Deny from all # </LimitExcept> #</Directory> # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig /etc/mime.types # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # <IfModule mod_mime_magic.c> # MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic </IfModule> # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # EnableMMAP: Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap # #EnableMMAP off # # EnableSendfile: Control whether the sendfile kernel support is # used to deliver files (assuming that the OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile # #EnableSendfile off # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host's errors will be logged there and not here. # ErrorLog logs/error_log # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this # requires the mod_logio module to be loaded. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a <VirtualHost> # container, they will be logged here. Contrariwise, if you *do* # define per-<VirtualHost> access logfiles, transactions will be # logged therein and *not* in this file. # #CustomLog logs/access_log common # # If you would like to have separate agent and referer logfiles, uncomment # the following directives. # #CustomLog logs/referer_log referer #CustomLog logs/agent_log agent # # For a single logfile with access, agent, and referer information # (Combined Logfile Format), use the following directive: # CustomLog logs/access_log combined # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature On # # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn't aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If you # do not use FancyIndexing, you may comment this out. # Alias /icons/ "/var/www/icons/" <Directory "/var/www/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> # # WebDAV module configuration section. # <IfModule mod_dav_fs.c> # Location of the WebDAV lock database. DAVLockDB /var/lib/dav/lockdb </IfModule> # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" # # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example: # Redirect permanent /foo http://www.example.com/bar # # Directives controlling the display of server-generated directory listings. # # # IndexOptions: Controls the appearance of server-generated directory # listings. # IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable # # AddIcon* directives tell the server which icon to show for different # files or filename extensions. These are only displayed for # FancyIndexed directories. # AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip AddIconByType (TXT,/icons/text.gif) text/* AddIconByType (IMG,/icons/image2.gif) image/* AddIconByType (SND,/icons/sound2.gif) audio/* AddIconByType (VID,/icons/movie.gif) video/* AddIcon /icons/binary.gif .bin .exe AddIcon /icons/binhex.gif .hqx AddIcon /icons/tar.gif .tar AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip AddIcon /icons/a.gif .ps .ai .eps AddIcon /icons/layout.gif .html .shtml .htm .pdf AddIcon /icons/text.gif .txt AddIcon /icons/c.gif .c AddIcon /icons/p.gif .pl .py AddIcon /icons/f.gif .for AddIcon /icons/dvi.gif .dvi AddIcon /icons/uuencoded.gif .uu AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl AddIcon /icons/tex.gif .tex AddIcon /icons/bomb.gif core AddIcon /icons/back.gif .. AddIcon /icons/hand.right.gif README AddIcon /icons/folder.gif ^^DIRECTORY^^ AddIcon /icons/blank.gif ^^BLANKICON^^ # # DefaultIcon is which icon to show for files which do not have an icon # explicitly set. # DefaultIcon /icons/unknown.gif # # AddDescription allows you to place a short description after a file in # server-generated indexes. These are only displayed for FancyIndexed # directories. # Format: AddDescription "description" filename # #AddDescription "GZIP compressed document" .gz #AddDescription "tar archive" .tar #AddDescription "GZIP compressed tar archive" .tgz # # ReadmeName is the name of the README file the server will look for by # default, and append to directory listings. # # HeaderName is the name of a file which should be prepended to # directory indexes. ReadmeName README.html HeaderName HEADER.html # # IndexIgnore is a set of filenames which directory indexing should ignore # and not include in the listing. Shell-style wildcarding is permitted. # IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t # # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Specify a default charset for all content served; this enables # interpretation of all content as UTF-8 by default. To use the # default browser choice (ISO-8859-1), or to allow the META tags # in HTML content to override this choice, comment out this # directive: # AddDefaultCharset UTF-8 # # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types. # #AddType application/x-tar .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # Despite the name similarity, the following Add* directives have nothing # to do with the FancyIndexing customization directives above. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # # For files that include their own HTTP headers: # #AddHandler send-as-is asis # # For type maps (negotiated resources): # (This is enabled by default to allow the Apache "It Worked" page # to be distributed in multiple languages.) # AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # AddType text/html .shtml AddOutputFilter INCLUDES .shtml # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location # # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # Putting this all together, we can internationalize error responses. # # We use Alias to redirect any /error/HTTP_<error>.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_<error>.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /var/www/error/include/ files and # copying them to /your/include/path/, even on a per-VirtualHost basis. # Alias /error/ "/var/www/error/" <IfModule mod_negotiation.c> <IfModule mod_include.c> <Directory "/var/www/error"> AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en es de fr ForceLanguagePriority Prefer Fallback </Directory> # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var </IfModule> </IfModule> # # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 # # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # #<Location /server-status> # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com #</Location> # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # #<Location /server-info> # SetHandler server-info # Order deny,allow # Deny from all # Allow from .example.com #</Location> # # Proxy Server directives. Uncomment the following lines to # enable the proxy server: # #<IfModule mod_proxy.c> #ProxyRequests On # #<Proxy *> # Order deny,allow # Deny from all # Allow from .example.com #</Proxy> # # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block # #ProxyVia On # # To enable a cache of proxied content, uncomment the following lines. # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details. # #<IfModule mod_disk_cache.c> # CacheEnable disk / # CacheRoot "/var/cache/mod_proxy" #</IfModule> # #</IfModule> # End of proxy directives. ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost>
linux 下安装php的zip扩展报错
再Linux 下安装php的zip扩展 ``` wget http://pecl.php.net/get/zip-1.12.2.tgz #tar zxvf zip-1.12.2.tgz #cd zip-1.12.2 #/opt/php/bin/phpize #./configure --with-php-config=/opt/php/bin/php-config #make ``` make后报错,make: * [php_zip.lo] Error 1 ![图片说明](https://img-ask.csdn.net/upload/201710/12/1507771584_406251.png) ![图片说明](https://img-ask.csdn.net/upload/201710/12/1507771596_471263.png) 尝试过更换其它的zip版本都没有办法。请问下谁知道解决方法呢?感谢了。 0人回答 2人浏览
espeak在ubuntu10.10下交叉编译的问题
在ubuntu10.10下交叉编译espeak,其中portaudio的版本为pa_stable_v19_20111121.tgz交叉编译成功,并生成相应的库,在编译espeak的时候(espeak为espeak-1.47.05-source.zip),把生成的lib文件夹下的所有库拷贝到/usr/lib和/usr/bin以及/../bin下make,结果还是报错,错误如下: /opt/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.4.6/../../../../arm-unknown-linux-gnueabi/bin/ld: warning: libportaudio.so.2, needed by ./libespeak.so, not found (try using -rpath or -rpath-link) ./libespeak.so: undefined reference to `Pa_GetDeviceInfo' ./libespeak.so: undefined reference to `Pa_AbortStream' ./libespeak.so: undefined reference to `Pa_StartStream' ./libespeak.so: undefined reference to `Pa_StopStream' ./libespeak.so: undefined reference to `Pa_GetErrorText' ./libespeak.so: undefined reference to `Pa_GetDeviceCount' ./libespeak.so: undefined reference to `Pa_IsStreamActive' ./libespeak.so: undefined reference to `Pa_OpenDefaultStream' ./libespeak.so: undefined reference to `Pa_OpenStream' ./libespeak.so: undefined reference to `Pa_Initialize' ./libespeak.so: undefined reference to `Pa_Terminate' ./libespeak.so: undefined reference to `Pa_GetHostApiInfo' ./libespeak.so: undefined reference to `Pa_CloseStream' ./libespeak.so: undefined reference to `Pa_GetDefaultOutputDevice' ./libespeak.so: undefined reference to `Pa_IsStreamStopped' ./libespeak.so: undefined reference to `Pa_IsFormatSupported' collect2: ld returned 1 exit status make: *** [espeak] 错误 1 这个问题已经困扰我很长时间,请求大神们给点意见,谢谢。
iOS OpenCV3.4.2加载TensorFlow已训练好的pb模型失败
各位大哥大姐好! 小白最近在学习OpenCV,使用的是iOS端3.4.2版本:https://opencv.org/releases.html 使用DNN的cv::dnn::readNetFromTensorflow()方法加载TensorFlow网络模型失败,net为empty TensorFlow模型使用的是别人训练好的http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz 这几天尝试了很多模型,也寻了很多中英文的网站论坛。然,未果。 这可急坏了小白,忘大神们不吝赐教!小白愿以身相...额,还是送分吧!感谢!! ![help](https://img-ask.csdn.net/upload/201809/16/1537107723_393719.png)
动态规划入门到熟悉,看不懂来打我啊
持续更新。。。。。。 2.1斐波那契系列问题 2.2矩阵系列问题 2.3跳跃系列问题 3.1 01背包 3.2 完全背包 3.3多重背包 3.4 一些变形选讲 2.1斐波那契系列问题 在数学上,斐波纳契数列以如下被以递归的方法定义:F(0)=0,F(1)=1, F(n)=F(n-1)+F(n-2)(n&gt;=2,n∈N*)根据定义,前十项为1, 1, 2, 3...
130 个相见恨晚的超实用网站,一次性分享出来
相见恨晚的超实用网站 持续更新中。。。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch, ...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
我在支付宝花了1分钟,查到了女朋友的开房记录!
在大数据时代下,不管你做什么都会留下蛛丝马迹,只要学会把各种软件运用到极致,捉奸简直轻而易举。今天就来给大家分享一下,什么叫大数据抓出轨。据史料证明,马爸爸年轻时曾被...
shell脚本:备份数据库、代码上线
备份MySQL数据库 场景: 一台MySQL服务器,跑着5个数据库,在没有做主从的情况下,需要对这5个库进行备份 需求: 1)每天备份一次,需要备份所有的库 2)把备份数据存放到/data/backup/下 3)备份文件名称格式示例:dbname-2019-11-23.sql 4)需要对1天以前的所有sql文件压缩,格式为gzip 5)本地数据保留1周 6)需要把备份的数据同步到远程备份中心,假如...
聊聊C语言和指针的本质
坐着绿皮车上海到杭州,24块钱,很宽敞,在火车上非正式地聊几句。 很多编程语言都以 “没有指针” 作为自己的优势来宣传,然而,对于C语言,指针却是与生俱来的。 那么,什么是指针,为什么大家都想避开指针。 很简单, 指针就是地址,当一个地址作为一个变量存在时,它就被叫做指针,该变量的类型,自然就是指针类型。 指针的作用就是,给出一个指针,取出该指针指向地址处的值。为了理解本质,我们从计算机模型说起...
为什么你学不过动态规划?告别动态规划,谈谈我的经验
动态规划难吗?说实话,我觉得很难,特别是对于初学者来说,我当时入门动态规划的时候,是看 0-1 背包问题,当时真的是一脸懵逼。后来,我遇到动态规划的题,看的懂答案,但就是自己不会做,不知道怎么下手。就像做递归的题,看的懂答案,但下不了手,关于递归的,我之前也写过一篇套路的文章,如果对递归不大懂的,强烈建议看一看:为什么你学不会递归,告别递归,谈谈我的经验 对于动态规划,春招秋招时好多题都会用到动态...
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外...
字节跳动面试官这样问消息队列:分布式事务、重复消费、顺序消费,我整理了一下
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式和人才交流群,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸...
2020年大前端发展趋势
迅速发展的前端开发,在每⼀年,都为开发者带来了新的关键词。2019 年已步⼊尾声,2020 年前端发展的关键词⼜将有哪些呢?发展的方向又会是什么呢?参考2019年大前端的发展,不出意外,前端依旧会围绕⼩程序、超级APP、跨端开发、前端⼯程化以及新技术运用等几个方面进行展开(可以参考2019年大前端技术趋势深度解读)。 小程序 在⼩程序⽅⾯,今年仍然是⼩程序突⻜猛进的⼀年,各⼤主流的 App 都上线...
如何安装 IntelliJ IDEA 最新版本——详细教程
IntelliJ IDEA 简称 IDEA,被业界公认为最好的 Java 集成开发工具,尤其在智能代码助手、代码自动提示、代码重构、代码版本管理(Git、SVN、Maven)、单元测试、代码分析等方面有着亮眼的发挥。IDEA 产于捷克,开发人员以严谨著称的东欧程序员为主。IDEA 分为社区版和付费版两个版本。 我呢,一直是 Eclipse 的忠实粉丝,差不多十年的老用户了。很早就接触到了 IDEA...
1个月时间整理了2019年上千道Java面试题,近500页文档!
Spring 面试题 1、一般问题 1.1、不同版本的 spring Framework 有哪些主要功能? 1.2、什么是 spring Framework? 1.3、列举 spring Framework 的优点。 1.4、spring Framework 有哪些不同的功能? 1.5、spring Framework 中有多少个模块,它们分别是什么? 1.6、什么是 spring ...
面试还搞不懂redis,快看看这40道面试题(含答案和思维导图)
Redis 面试题 1、什么是 Redis?. 2、Redis 的数据类型? 3、使用 Redis 有哪些好处? 4、Redis 相比 Memcached 有哪些优势? 5、Memcache 与 Redis 的区别都有哪些? 6、Redis 是单进程单线程的? 7、一个字符串类型的值能存储最大容量是多少? 8、Redis 的持久化机制是什么?各自的优缺点? 9、Redis 常见性...
为什么要推荐大家学习字节码?
配套视频: 为什么推荐大家学习Java字节码 https://www.bilibili.com/video/av77600176/ 一、背景 本文主要探讨:为什么要学习 JVM 字节码? 可能很多人会觉得没必要,因为平时开发用不到,而且不学这个也没耽误学习。 但是这里分享一点感悟,即人总是根据自己已经掌握的知识和技能来解决问题的。 这里有个悖论,有时候你觉得有些技术没用恰恰是...
在阿里,40岁的奋斗姿势
在阿里,40岁的奋斗姿势 在阿里,什么样的年纪可以称为老呢?35岁? 在云网络,有这样一群人,他们的平均年龄接近40,却刚刚开辟职业生涯的第二战场。 他们的奋斗姿势是什么样的呢? 洛神赋 “翩若惊鸿,婉若游龙。荣曜秋菊,华茂春松。髣髴兮若轻云之蔽月,飘飖兮若流风之回雪。远而望之,皎若太阳升朝霞;迫而察之,灼若芙蕖出渌波。” 爱洛神,爱阿里云 2018年,阿里云网络产品部门启动洛神2.0升...
【超详细分析】关于三次握手与四次挥手面试官想考我们什么?
在面试中,三次握手和四次挥手可以说是问的最频繁的一个知识点了,我相信大家也都看过很多关于三次握手与四次挥手的文章,今天的这篇文章,重点是围绕着面试,我们应该掌握哪些比较重要的点,哪些是比较被面试官给问到的,我觉得如果你能把我下面列举的一些点都记住、理解,我想就差不多了。 三次握手 当面试官问你为什么需要有三次握手、三次握手的作用、讲讲三次三次握手的时候,我想很多人会这样回答: 首先很多人会先讲下握...
压测学习总结(1)——高并发性能指标:QPS、TPS、RT、吞吐量详解
一、QPS,每秒查询 QPS:Queries Per Second意思是“每秒查询率”,是一台服务器每秒能够相应的查询次数,是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准。互联网中,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。 二、TPS,每秒事务 TPS:是TransactionsPerSecond的缩写,也就是事务数/秒。它是软件测试结果的测量单位。一个事务是指一...
新程序员七宗罪
当我发表这篇文章《为什么每个工程师都应该开始考虑开发中的分析和编程技能呢?》时,我从未想到它会对读者产生如此积极的影响。那些想要开始探索编程和数据科学领域的人向我寻求建议;还有一些人问我下一篇文章的发布日期;还有许多人询问如何顺利过渡到这个职业。我非常鼓励大家继续分享我在这个旅程的经验,学习,成功和失败,以帮助尽可能多的人过渡到一个充满无数好处和机会的职业生涯。亲爱的读者,谢谢你。 -罗伯特。 ...
活到老,学到老,程序员也该如此
全文共2763字,预计学习时长8分钟 图片来源:Pixabay 此前,“网传阿里巴巴要求尽快实现P8全员35周岁以内”的消息闹得沸沸扬扬。虽然很快被阿里辟谣,但苍蝇不叮无缝的蛋,无蜜不招彩蝶蜂。消息从何而来?真相究竟怎样?我们无从而知。我们只知道一个事实:不知从何时开始,程序猿也被划在了“吃青春饭”行业之列。 饱受“996ICU”摧残后,好不容易“头秃了变强了”,即将步入为“高...
Vue快速实现通用表单验证
本文开篇第一句话,想引用鲁迅先生《祝福》里的一句话,那便是:“我真傻,真的,我单单知道后端整天都是CRUD,我没想到前端整天都是Form表单”。这句话要从哪里说起呢?大概要从最近半个月的“全栈工程师”说起。项目上需要做一个城市配载的功能,顾名思义,就是通过框选和拖拽的方式在地图上完成配载。博主选择了前后端分离的方式,在这个过程中发现:首先,只要有依赖jQuery的组件,譬如Kendoui,即使使用...
2019年Spring Boot面试都问了什么?快看看这22道面试题!
Spring Boot 面试题 1、什么是 Spring Boot? 2、Spring Boot 有哪些优点? 3、什么是 JavaConfig? 4、如何重新加载 Spring Boot 上的更改,而无需重新启动服务器? 5、Spring Boot 中的监视器是什么? 6、如何在 Spring Boot 中禁用 Actuator 端点安全性? 7、如何在自定义端口上运行 Sprin...
Unity项目在pc和ios设备上黑屏的原因探究
0x00 由于项目上线了windows平台的项目(别问我为什么,咱也不敢说,咱也不敢问),由Unity5.4.6升级到Unity2018的过程中,遇到了各种各样的坑,本文为避坑指南1。本项目没有使用HDR和抗锯齿,由于查这几个问题查到吐血,前后用了3天的时间,本文充满了怨气,行文非常啰嗦,需要快速解决问题的,可以直接拉到最后看结论。 0x01 法线贴图 项目在unity2018出了新的androi...
关于裁员几点看法及建议
最近网易裁员事件引起广泛关注,昨天网易针对此事,也发了声明,到底谁对谁错,孰是孰非?我们作为吃瓜观众实在是知之甚少,所以不敢妄下定论。身处软件开发这个行业,近一两年来,对...
面试官:关于Java性能优化,你有什么技巧
通过使用一些辅助性工具来找到程序中的瓶颈,然后就可以对瓶颈部分的代码进行优化。 一般有两种方案:即优化代码或更改设计方法。我们一般会选择后者,因为不去调用以下代码要比调用一些优化的代码更能提高程序的性能。而一个设计良好的程序能够精简代码,从而提高性能。 下面将提供一些在JAVA程序的设计和编码中,为了能够提高JAVA程序的性能,而经常采用的一些方法和技巧。 1.对象的生成和大小的调整。 J...
【图解算法面试】记一次面试:说说游戏中的敏感词过滤是如何实现的?
版权声明:本文为苦逼的码农原创。未经同意禁止任何形式转载,特别是那些复制粘贴到别的平台的,否则,必定追究。欢迎大家多多转发,谢谢。 小秋今天去面试了,面试官问了一个与敏感词过滤算法相关的问题,然而小秋对敏感词过滤算法一点也没听说过。于是,有了下下事情的发生… 面试官开怼 面试官:玩过王者荣耀吧?了解过敏感词过滤吗?,例如在游戏里,如果我们发送“你在干嘛?麻痹演员啊你?”,由于“麻痹”是一个敏感词,...
相关热词 c#怎么获得线程名 c# usb 采集器 c# csv 读取 c# sort() c# 关闭io流 c# 响应函数 插入 c#面对对象的三大特性 c# 打印 等比缩放 c#弹出右键菜单 c#1如何搞成01
立即提问