Ubuntu14.04 gcc编译出错: undeclared

编译出错:‘EXIT_FALLURE’ undeclared (first use in this function) exit(EXIT_FALLURE);
源码如下:
#include
#include
#include
#include

void *thread_function(void *arg);
int main()
{
int res;
pthread_t a_thread;
void *thread_result;
res = pthread_create(&a_thread,NULL,thread_function,NULL);
if(res != 0)
{
perror("Pthread bulid faile!\n");
exit(EXIT_FAILURE);
}
sleep(3);
printf("Cancel patread...\n");
res = pthread_cancel(a_thread);
if(res != 0)
{
perror("Cancel pathread faile!\n");
exit(EXIT_FAILURE);
}
sleep(3);
printf("Cancel patread...\n");
res = pthread_cancel(a_thread);
if(res != 0)
{
perror("Cancel pathread faile!\n");
exit (EXIT_FAILURE);
}
exit(EXIT_SUCCESS);

}
void *thread_function(void *arg)
{
int i,res;
res = pthread_setcancelstste(PTHREAD_CANCEL_ENABLE,NULL);
if(res != 0)
{
perror("Pthread is faile!\n");
exit(EXIT_FALLURE);
}
printf("Pthread is running!\n");
for(i=0;i<10;i++)
{
printf("Pthread is running %d...\n");
sleep(1);
}
pthread_exit(0);
}

2个回答

这个宏定义是否有。头文件有没有包含正确

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Ubuntu 12.04 Tse make 出错
flex 安装了。 错误信息为: for n in uri hlink stack lib; do make -C $n || exit 1; done make[1]: Entering directory `/home/jshan/Downloads/Tse/tse.code/tse/uri' gcc -c -O2 -I/home/jshan/Downloads/Tse/tse.code/tse/include lex.uri.c uri.l: In function ‘urilex’: uri.l:494: error: invalid lvalue in increment uri.l:494: error: invalid lvalue in increment uri.l:494: error: invalid lvalue in increment uri.l:500: error: invalid lvalue in increment uri.l:500: error: invalid lvalue in increment uri.l:500: error: invalid lvalue in increment uri.l:506: error: invalid lvalue in increment uri.l:506: error: invalid lvalue in increment uri.l:506: error: invalid lvalue in increment uri.l:511: error: invalid lvalue in increment uri.l:511: error: invalid lvalue in increment uri.l:511: error: invalid lvalue in increment uri.l: In function ‘__path_merge’: uri.l:842: error: invalid lvalue in decrement uri.l:843: error: invalid lvalue in decrement uri.l:849: error: invalid lvalue in increment uri.l:850: error: invalid lvalue in increment uri.l:873: error: invalid lvalue in decrement uri.l:874: error: invalid lvalue in decrement uri.l:880: error: invalid lvalue in increment uri.l:881: error: invalid lvalue in increment uri.l:938: error: invalid lvalue in decrement uri.l:940: error: invalid lvalue in decrement uri.l: In function ‘uri_combine’: uri.l:1073: error: invalid lvalue in increment uri.l:1073: error: invalid lvalue in increment uri.l:1073: error: invalid lvalue in increment uri.l:1097: error: invalid lvalue in increment uri.l:1097: error: invalid lvalue in increment uri.l:1097: error: invalid lvalue in increment uri.l:1108: error: invalid lvalue in increment uri.l:1108: error: invalid lvalue in increment uri.l:1108: error: invalid lvalue in increment uri.l:1119: error: invalid lvalue in increment uri.l:1119: error: invalid lvalue in increment uri.l:1119: error: invalid lvalue in increment uri.l:1129: error: invalid lvalue in increment uri.l:1129: error: invalid lvalue in increment uri.l:1129: error: invalid lvalue in increment uri.l:1139: error: invalid lvalue in increment uri.l:1139: error: invalid lvalue in increment uri.l:1139: error: invalid lvalue in increment uri.l:1150: error: invalid lvalue in increment uri.l:1150: error: invalid lvalue in increment uri.l:1150: error: invalid lvalue in increment uri.l:1162: error: invalid lvalue in increment uri.l:1162: error: invalid lvalue in increment uri.l:1162: error: invalid lvalue in increment make[1]: *** [lex.uri.o] Error 1
Ubuntu14.04升级gcc版本到5出错
我主要按照博客[Ubuntu 14.04 LTS 下升级 gcc 到 gcc-4.9、gcc-5 版本](http://www.cnblogs.com/BlackStorm/p/5183490.html "")的步骤升级gcc。 ``` sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install software-properties-common sudo apt-get upgrade sudo apt-get install gcc-5 g++-5 ``` 之后出现问题: ``` gph@gph-pc:~$ sudo apt-get install gcc-5 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: gcc-5:i386 : Depends: cpp-5:i386 (= 5.4.1-2ubuntu1~14.04) but it is not going to be installed Depends: libcc1-0:i386 (>= 5.4.1-2ubuntu1~14.04) but it is not going to be installed Depends: binutils:i386 (>= 2.24) but it is not going to be installed Depends: libgcc-5-dev:i386 (= 5.4.1-2ubuntu1~14.04) but it is not going to be installed Depends: libc6:i386 (>= 2.15) but it is not going to be installed Depends: libgcc1:i386 (>= 1:3.0) but it is not going to be installed Depends: libgmp10:i386 but it is not going to be installed Depends: libisl15:i386 (>= 0.15) but it is not going to be installed Depends: libmpc3:i386 but it is not going to be installed Depends: libmpfr4:i386 (>= 3.1.3) but it is not going to be installed Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed Recommends: libc6-dev:i386 (>= 2.13-0ubuntu6) but it is not going to be installed E: Unable to correct problems, you have held broken packages. ``` 请问有人知道如何解决吗? 已经百度和Google过相关的问题了,还是没有解决,请各位提供帮助,谢谢! =================================================================== 最后通过本地编译安装的方式安装了gcc5.3.0,但是在编译一个代码的时候出现如下错误: ``` .build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char.build_release/lib, std/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std:::__cxx11:::basic_string<charchar_traits, std<::char_traits<charchar>, std::allocator<char> > >, std::allocator<boost::sub_match<>__gnu_cxx::__normal_iterator<, .build_release/tools/get_image_size.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)': get_image_size.cpp:(.text._ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x41): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()' .build_release/tools/get_image_size.o: In function `main': get_image_size.cpp:(.text.startup+0x66): undefined reference to `google::SetUsageMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' get_image_size.cpp:(.text.startup+0x722): undefined reference to `caffe::GetImageSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int*, int*)' 。 。 。 。 。 。 .build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()' collect2: error: ld returned 1 exit status make: *** [.build_release/tools/device_query.bin] Error 1 ``` 这又是什么问题。。。?
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 这个问题已经困扰我很长时间,请求大神们给点意见,谢谢。
ubuntu 12.04 configure Sqlcipher 出问题!!!
ubuntu 12.04 configure Sqlcipher 源码时候,怎么会出问题: :~/sqlcipher/sqlcipher$ sudo ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/oliver/sqlcipher/sqlcipher': configure: error: C compiler cannot create executables See `config.log' for more details 找不出原因啊,球解!
ubuntu_14.04下gcc编译问题
main函数体仅打印hello,world,gcc发现如下问题,不解: 1. 头文件无#include<stdio.h>,gcc不报错而报警告,为什么? 2. 函数体中使用"exit(EXIT_SUCCESS);"代替“return(0);"需要使用头文件#include<stdlib.h> .如果头文件不加入,会报错 : ”hello.c:9:7: error: ‘EXIT_SUCCESS’ undeclared (first use in this function) exit(EXIT_SUCCESS); “ 3. 将printf和exit原型使用了一个hello.h的头文件放到hello.c同目录下,在hello.c中 加入了头文件#include ”hello.h“,依然出现错误,后将stdlib.h文件重定向>>到hello.h后面(ps删掉main函数),依然报error. 这个问题,希望大神解惑,非常感谢!
Ubuntu 16.04 编译 Ncurses 6.0 报错
### Ubuntu 16.04 LTS 编译 Ncurses 6.0 报错: ``` In file included from ./curses.priv.h:325:0, from ../ncurses/lib_gen.c:19: _24273.c:843:15: error: expected ‘)’ before ‘int’ ../include/curses.h:1631:56: note: in definition of macro ‘mouse_trafo’ #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) ^ Makefile:962: recipe for target '../objects/lib_gen.o' failed make[1]: *** [../objects/lib_gen.o] Error 1 make[1]: Leaving directory '/home/netsamir/Sofware/Tmux/ncurses-6.0/ncurses' Makefile:113: recipe for target 'all' failed make: *** [all] Error 2 ``` ### 系统配置 ``` $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS Release: 16.04 Codename: xenial $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ```
opencv3.1.0交叉编译 使用摄像头 编译出错
opencv3.1.0交叉编译: 宿主机:ubuntu 14.04 交叉编译工具:gcc-4.6.2-glibc-2.13-linaro 在使用Cmake-gui配置时,因为要使用摄像头(OV3640)取图像,进行图像处理,所以将Operating System填为Linux, 并将WITH_V4L勾选上,之后执行make命令,总是编译错误,提示许多的库找不到,如下图中所示; 如果将Operating System填为arm-linux,没有勾选WITH_V4L,则可以make编译通过,但在arm开发板上用OpenCV打不开摄像头,isOpened ()返回值是false。请帮忙分析问题原因,希望给提供些正确的解决办法,非常感激! ![勾选WITH_V4L 编译错误信息](https://img-ask.csdn.net/upload/201605/29/1464522128_617542.png)![勾选WITH_V4L 编译错误信息](https://img-ask.csdn.net/upload/201605/29/1464522146_811706.jpg) ![cmake-gui 配置为Linux](https://img-ask.csdn.net/upload/201605/30/1464565387_398821.png) ![cmake-gui 配置为arm-linux](https://img-ask.csdn.net/upload/201605/30/1464565406_575197.png)
Ubuntu 16 64位安装gcc4.4.0 make失败,求大神解救
../.././gcc/gimple.h:67:54: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic] gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \ ^ ../.././gcc/gimple.h:4280:3: note: in expansion of macro ‘GIMPLE_CHECK’ GIMPLE_CHECK (gs, GIMPLE_PREDICT); ^ ../.././gcc/gimple.h:68:17: warning: enum conversion when passing argument 6 of ‘gimple_check_failed’ is invalid in C++ [-Wc++-compat] (CODE), 0); \ ^ ../.././gcc/gimple.h:4280:3: note: in expansion of macro ‘GIMPLE_CHECK’ GIMPLE_CHECK (gs, GIMPLE_PREDICT); ^ ../.././gcc/gimple.h:59:13: note: expected ‘enum tree_code’ but argument is of type ‘int’ extern void gimple_check_failed (const_gimple, const char *, int, \ ^ ../.././gcc/toplev.c: At top level: ../.././gcc/toplev.c:536:1: error: redefinition of ‘floor_log2’ floor_log2 (unsigned HOST_WIDE_INT x) ^ In file included from ../.././gcc/toplev.c:58:0: ../.././gcc/toplev.h:190:1: note: previous definition of ‘floor_log2’ was here floor_log2 (unsigned HOST_WIDE_INT x) ^ ../.././gcc/toplev.c:571:1: error: redefinition of ‘exact_log2’ exact_log2 (unsigned HOST_WIDE_INT x) ^ In file included from ../.././gcc/toplev.c:58:0: ../.././gcc/toplev.h:196:1: note: previous definition of ‘exact_log2’ was here exact_log2 (unsigned HOST_WIDE_INT x) ^ ../.././gcc/toplev.c: In function ‘print_to_asm_out_file’: ../.././gcc/toplev.c:1185:7: warning: format not a string literal and no format arguments [-Wformat-security] fprintf (asm_out_file, text); ^ ../.././gcc/toplev.c: In function ‘print_to_stderr’: ../.././gcc/toplev.c:1214:7: warning: format not a string literal and no format arguments [-Wformat-security] fprintf (stderr, text); ^ Makefile:2470: recipe for target 'toplev.o' failed make[3]: *** [toplev.o] Error 1 make[3]: Leaving directory '/home/zsj/下载/related/gcc-4.4.0/host-x86_64-unknown-linux-gnu/gcc' Makefile:5144: recipe for target 'all-stage1-gcc' failed make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory '/home/zsj/下载/related/gcc-4.4.0' Makefile:19883: recipe for target 'stage1-bubble' failed make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory '/home/zsj/下载/related/gcc-4.4.0' Makefile:741: recipe for target 'all' failed make: *** [all] Error 2
makefile编译的时候出现遗漏分隔符的情况
我在该目录的中端下输入make时,就会报错:***遗漏分隔符。停止 下面是我的代码,大牛帮我看看吧,灰常感谢!! /****************************** makefile ******************************/ filsys:main.o igetput.o iallfre.o ballfre.o name.o access.o log.o close.o creat.o delete.o dir.o open.o rdwt.o format.o install.o halt.o gcc -o filsys main.o igetput.o iallfre.o ballfre.o name.o access.o log.o close.o creat.o delete.o dir.o open.o rdwt.o format.o install.o halt.o main.o:main.c filesys.h gcc -c main.c igetput.o:igetput.c filesys.h gcc -c igetput.c iallfre.o:iallfre.c filesys.h gcc -c iallfre.c ballfre.o:ballfre.c filesys.h gcc -c ballfre.c name.o:name.c filesys.h gcc -c name.c access.o:access.c filesys.h gcc -c access.c main.o:main.c filesys.h gcc -c main.c main.o:main.c filesys.h gcc -c main.c log.o:log.c filesys.h gcc -c log.c close.o:close.c filesys.h gcc -c close.c creat.o:creat.c filesys.h gcc -c creat.c delete.o:delete.c filesys.h gcc -c delete.c dir.o:dir.c filesys.h gcc -c dir.c open.o:open.c filesys.h gcc -c open.c rdwt.o:rdwt.c filesys.h gcc -c rdwt.c format.o:format.c filesys.h gcc -c format.c install.o:install.c filesys.h gcc -c install.c halt.o:halt.c filesys.h gcc - c halt.c
内核编译出错,求大佬指导,猴一天了
编译内核make后 root@yu-virtual-machine:/linux/linux-2.6.32# make gcc: error: unrecognized argument in option ‘-mabi=64’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: 0: 没有那个文件或目录 gcc: error: unrecognized command line option ‘-G’ gcc: error: unrecognized command line option ‘-mno-abicalls’; did you mean ‘-Wno-abi’? CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-mips CC kernel/bounds.s gcc: error: unrecognized argument in option ‘-mabi=64’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: 0: 没有那个文件或目录![图片说明](https://img-ask.csdn.net/upload/201909/17/1568708940_730443.png) gcc: error: unrecognized command line option ‘-G’ gcc: error: unrecognized command line option ‘-mno-abicalls’; did you mean ‘-Wno-abi’? /linux/linux-2.6.32/./Kbuild:35: recipe for target 'kernel/bounds.s' failed make[1]: *** [kernel/bounds.s] Error 1 Makefile:982: recipe for target 'prepare0' failed make: *** [prepare0] Error 2 root@yu-virtual-machine:/linux/linux-2.6.32#
centos 安装phpstudy 是报错 phpstudy-func.sh: line 123: which: command not found
![图片说明](https://img-ask.csdn.net/upload/201905/16/1557995256_768164.png) centos 安装phpstudy 时报错 phpstudy-func.sh: line 123: which: command not found gcc 命令不可用,请先安装 gcc gcc not found,please install it. gcc我已经安装了,请大神指导下还有可没能时什么错误。 安装步骤: wget -c http://lamp.phpstudy.net/phpstudy.bin chmod +x phpstudy.bin #权限设置 ./phpstudy.bin     #运行安装 报错: phpstudy-func.sh: line 123: which: command not found gcc 命令不可用,请先安装 gcc gcc not found,please install it.
关于python安装pymssql报错,求大神指点,在ubuntu14.04下
报错内容: ``` (pyenvdata)lin@lin-ThinkPad:~$ pip install pymssql Downloading/unpacking pymssql Downloading pymssql-2.1.1.tar.gz (2.4MB): 2.4MB downloaded Running setup.py (path:/home/lin/pyenvdata/build/pymssql/setup.py) egg_info for package pymssql setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Ubuntu', '14.04', 'trusty') setup.py: platform.libc_ver() => ('glibc', '2.4') setup.py: Not using bundled FreeTDS setup.py: include_dirs = ['/usr/local/include'] setup.py: library_dirs = ['/usr/local/lib'] Installed /home/lin/pyenvdata/build/pymssql/setuptools_git-1.1-py2.7.egg Installing collected packages: pymssql Running setup.py install for pymssql setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Ubuntu', '14.04', 'trusty') setup.py: platform.libc_ver() => ('glibc', '2.4') setup.py: Not using bundled FreeTDS setup.py: include_dirs = ['/usr/local/include'] setup.py: library_dirs = ['/usr/local/lib'] building '_mssql' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include/python2.7 -c _mssql.c -o build/temp.linux-x86_64-2.7/_mssql.o -DMSDBLIB _mssql.c:314:22: fatal error: sqlfront.h: 没有那个文件或目录 #include "sqlfront.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Complete output from command /home/lin/pyenvdata/bin/python -c "import setuptools, tokenize;__file__='/home/lin/pyenvdata/build/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c75p_h-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/lin/pyenvdata/include/site/python2.7: setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Ubuntu', '14.04', 'trusty') setup.py: platform.libc_ver() => ('glibc', '2.4') setup.py: Not using bundled FreeTDS setup.py: include_dirs = ['/usr/local/include'] setup.py: library_dirs = ['/usr/local/lib'] running install running build running build_ext building '_mssql' extension creating build creating build/temp.linux-x86_64-2.7 x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include/python2.7 -c _mssql.c -o build/temp.linux-x86_64-2.7/_mssql.o -DMSDBLIB _mssql.c:314:22: fatal error: sqlfront.h: 没有那个文件或目录 #include "sqlfront.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Cleaning up... Command /home/lin/pyenvdata/bin/python -c "import setuptools, tokenize;__file__='/home/lin/pyenvdata/build/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c75p_h-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/lin/pyenvdata/include/site/python2.7 failed with error code 1 in /home/lin/pyenvdata/build/pymssql Traceback (most recent call last): File "/home/lin/pyenvdata/bin/pip", line 11, in <module> sys.exit(main()) File "/home/lin/pyenvdata/local/lib/python2.7/site-packages/pip/__init__.py", line 185, in main return command.main(cmd_args) File "/home/lin/pyenvdata/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 46: ordinal not in range(128) ```
ubuntu 13.04搭建交叉编译环境
ky@ubuntu:~$ sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev Reading package lists... Done Building dependency tree Reading state information... Done flex is already the newest version. g++ is already the newest version. subversion is already the newest version. bzip2 is already the newest version. gettext is already the newest version. patch is already the newest version. gcc is already the newest version. unzip is already the newest version. make is already the newest version. binutils is already the newest version. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libncurses5-dev : Depends: libncurses5 (= 5.9-4) but 5.9-10ubuntu4 is to be installed Depends: libtinfo-dev (= 5.9-4) but it is not going to be installed Depends: ncurses-bin (= 5.9-4) but 5.9-10ubuntu4 is to be installed zlib1g-dev : Depends: zlib1g (= 1:1.2.3.4.dfsg-3ubuntu4) but 1:1.2.7.dfsg-13ubuntu2 is to be installed E: Unable to correct problems, you have held broken packages. 请问各位大神一下,怎么解决 The following packages have unmet dependencies: libncurses5-dev : Depends: libncurses5 (= 5.9-4) but 5.9-10ubuntu4 is to be installed Depends: libtinfo-dev (= 5.9-4) but it is not going to be installed Depends: ncurses-bin (= 5.9-4) but 5.9-10ubuntu4 is to be installed zlib1g-dev : Depends: zlib1g (= 1:1.2.3.4.dfsg-3ubuntu4) but 1:1.2.7.dfsg-13ubuntu2 is to be installed
android 7.1源码编译 出错
以下是shell上的打印 ``` Starting build with ninja [476/5393] ninja: Entering directory `.' [ 1% 8/468] target Executable: dexdump (out/target/product/px3/obj/EXECUTABLES/dexdump_intermediates/LINKED/dexdump) FAILED: /bin/bash -c "prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -pie -nostdlib -Bdynamic -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc -Lout/target/product/ px3/obj/lib -Wl,-rpath-link=out/target/product/px3/obj/lib out/target/product/px3/obj/lib/crtbegin_dynamic.o out/target/product/px3/obj/EXECUTABLES/dexdump_intermediates/DexDump.o -Wl ,--whole-archive -Wl,--no-whole-archive out/target/product/px3/obj/STATIC_LIBRARIES/libdex_intermediates/libdex.a out/target/product/px3/obj/STATIC_LIBRARIES/libbase_intermediates/libbase.a out/targ et/product/px3/obj/STATIC_LIBRARIES/libunwind_llvm_intermediates/libunwind_llvm.a out/target/product/px3/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a prebuilts/gcc/ linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/lib/armv7-a/libatomic.a prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../li b/gcc/arm-linux-androideabi/4.9/armv7-a/libgcc.a -lz -llog -lutils -lc++ -ldl -lc -lm -o out/target/product/px3/obj/EXECUTABLES/dexdump_intermediates/LINKED/dexdump -Wl,-z,noexecstack -Wl,-z,relro -W l,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--icf=safe -Wl,--hash-style=gnu -Wl,--no-undefined-version -Wl,--fix-cortex-a8 -target arm-linux-androideabi -Bprebuilts /gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wl,--exclude-libs,libunwind_llvm.a -Wl,--no-undefined out/target/product/px3/obj/lib/crtend_android.o" dalvik/dexdump/DexDump.cpp:517: error: undefined reference to 'dexReadAndVerifyClassData(unsigned char const**, unsigned char const*)' dalvik/dexdump/DexDump.cpp:627: error: undefined reference to 'dexDecodeDebugInfo(DexFile const*, DexCode const*, char const*, unsigned int, unsigned int, int (*)(void*, unsigned int, unsigned int), voi d (*)(void*, unsigned short, unsigned int, unsigned int, char const*, char const*, char const*), void*)' dalvik/dexdump/DexDump.cpp:653: error: undefined reference to 'dexDecodeDebugInfo(DexFile const*, DexCode const*, char const*, unsigned int, unsigned int, int (*)(void*, unsigned int, unsigned int), voi d (*)(void*, unsigned short, unsigned int, unsigned int, char const*, char const*, char const*), void*)' dalvik/libdex/DexProto.h:143: error: undefined reference to 'dexProtoCopyMethodDescriptor(DexProto const*)' dalvik/dexdump/DexDump.cpp:890: error: undefined reference to 'dexGetOpcodeName(Opcode)' dalvik/dexdump/DexDump.cpp:1055: error: undefined reference to 'gDexOpcodeInfo' dalvik/dexdump/DexDump.cpp:845: error: undefined reference to 'gDexOpcodeInfo' dalvik/dexdump/DexDump.cpp:1120: error: undefined reference to 'dexDecodeInstruction(unsigned short const*, DecodedInstruction*)' dalvik/dexdump/DexDump.cpp:1128: error: undefined reference to 'gDexOpcodeInfo' dalvik/libdex/DexProto.h:143: error: undefined reference to 'dexProtoCopyMethodDescriptor(DexProto const*)' dalvik/dexdump/DexDump.cpp:1388: error: undefined reference to 'dexReadAndVerifyClassData(unsigned char const**, unsigned char const*)' dalvik/dexdump/DexDump.cpp:1704: error: undefined reference to 'dexReadAndVerifyClassData(unsigned char const**, unsigned char const*)' dalvik/dexdump/DexDump.cpp:1795: error: undefined reference to 'dexOpenAndMap(char const*, char const*, MemMapping*, bool)' dalvik/dexdump/DexDump.cpp:1804: error: undefined reference to 'dexFileParse(unsigned char const*, unsigned int, int)' dalvik/dexdump/DexDump.cpp:1820: error: undefined reference to 'sysReleaseShmem(MemMapping*)' dalvik/dexdump/DexDump.cpp:1822: error: undefined reference to 'dexFileFree(DexFile*)' dalvik/dexdump/DexDump.cpp:1820: error: undefined reference to 'sysReleaseShmem(MemMapping*)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) [ 1% 8/468] Ensure Jack server is installed and started Jack server already installed in "/home2/hxw/.jack-server" Server is already running ``` 我已经试过改了jack的服务端口了 .jack .jack-setting .jack-server/config.properties 里面的地址都改了还是不行 据说不是jack的问题, jack错误只是编译错误引起的。 在网上搜 DexDump都只能搜到一些教怎么单独编译之类的教程 没找到有类似错误的
从windows到ubuntu16.04转换C++编译器的问题.
我的电脑从 win10 换到了 ubuntu16.04 , 什么都好 . 就是C++的编译器 gcc/g++ 与windowns下的 vc++ 无法兼容 API 的问题然我很无奈 .
Ubuntu 14.04 TLS Nginx RTMP 测试记录和提问?
参考文章: https://blog.csdn.net/u011298145/article/details/78883598 问题描述: 1、添加nginx-rtmp-module-master时,最后一行报错 ``` root@cccsq-server:/var/www/html/nginx-rtmp/nginx-1.7.5# ./configure --prefix=/usr/local/nginx --add-module=/usr/local/nginx-rtmp-module --with-http_ssl_module --with-http_flv_module --with-http_mp4_module checking for OS + Linux 3.13.0-79-lowlatency x86_64 checking for C compiler ... found + using GNU C compiler + gcc version: 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4) checking for gcc -pipe switch ... found checking for gcc builtin atomic operations ... found checking for C99 variadic macros ... found checking for gcc variadic macros ... found checking for unistd.h ... found checking for inttypes.h ... found checking for limits.h ... found checking for sys/filio.h ... not found checking for sys/param.h ... found checking for sys/mount.h ... found checking for sys/statvfs.h ... found checking for crypt.h ... found checking for Linux specific features checking for epoll ... found checking for EPOLLRDHUP ... found checking for O_PATH ... found checking for sendfile() ... found checking for sendfile64() ... found checking for sys/prctl.h ... found checking for prctl(PR_SET_DUMPABLE) ... found checking for sched_setaffinity() ... found checking for crypt_r() ... found checking for sys/vfs.h ... found checking for nobody group ... not found checking for nogroup group ... found checking for poll() ... found checking for /dev/poll ... not found checking for kqueue ... not found checking for crypt() ... not found checking for crypt() in libcrypt ... found checking for F_READAHEAD ... not found checking for posix_fadvise() ... found checking for O_DIRECT ... found checking for F_NOCACHE ... not found checking for directio() ... not found checking for statfs() ... found checking for statvfs() ... found checking for dlopen() ... not found checking for dlopen() in libdl ... found checking for sched_yield() ... found checking for SO_SETFIB ... not found checking for SO_ACCEPTFILTER ... not found checking for TCP_DEFER_ACCEPT ... found checking for TCP_KEEPIDLE ... found checking for TCP_FASTOPEN ... found checking for TCP_INFO ... found checking for accept4() ... found checking for int size ... 4 bytes checking for long size ... 8 bytes checking for long long size ... 8 bytes checking for void * size ... 8 bytes checking for uint64_t ... found checking for sig_atomic_t ... found checking for sig_atomic_t size ... 4 bytes checking for socklen_t ... found checking for in_addr_t ... found checking for in_port_t ... found checking for rlim_t ... found checking for uintptr_t ... uintptr_t found checking for system byte ordering ... little endian checking for size_t size ... 8 bytes checking for off_t size ... 8 bytes checking for time_t size ... 8 bytes checking for setproctitle() ... not found checking for pread() ... found checking for pwrite() ... found checking for sys_nerr ... found checking for localtime_r() ... found checking for posix_memalign() ... found checking for memalign() ... found checking for mmap(MAP_ANON|MAP_SHARED) ... found checking for mmap("/dev/zero", MAP_SHARED) ... found checking for System V shared memory ... found checking for POSIX semaphores ... not found checking for POSIX semaphores in libpthread ... found checking for struct msghdr.msg_control ... found checking for ioctl(FIONBIO) ... found checking for struct tm.tm_gmtoff ... found checking for struct dirent.d_namlen ... not found checking for struct dirent.d_type ... found checking for sysconf(_SC_NPROCESSORS_ONLN) ... found checking for openat(), fstatat() ... found checking for getaddrinfo() ... found configuring additional modules adding module in /usr/local/nginx-rtmp-module **./configure: error: no /usr/local/nginx-rtmp-module/config was found** ``` 意思好像说,没有找到这个config 文件,这个路径下面本来就没有这个文件啊,之前没有加载这么多模块的时候,也没有报错。 在末尾添加如下 配置 rtmp {     server {             listen 1935;             chunk_size 4096;             application live {                     live on;                     record off; hls on;   hls_path /usr/share/nginx/html/hls;   hls_fragment 2s;                     exec ffmpeg -i rtmp://localhost/live/$name -threads 1 -c:v libx264 -profile:v baseline -b:v 350K -s 640x360 -f flv -c:a aac -ac 1 -strict -2 -b:a 56k rtmp://localhost/live360p/$name;             }             application live360p {               #该挂载点为360p的压缩画面                     live on;                     record off;         } application hls360p {     #个人测试,单独开放的rtmp+hls360p挂载点和hls2挂载点的360p hls流                 live on;                   hls on;                   hls_path /usr/share/nginx/html/hls2;   hls_fragment 2s;             }       } } 在末尾添加这个,启动ng报错,第108或者109或者110行, 那一行的指令是 server { } ,不知道什么情况。 root@cccsq-server:/var/www/html/nginx-rtmp/nginx-1.7.5# service nginx start * Starting Nginx Server... nginx: [emerg] unknown directive " " in /usr/local/nginx/conf/nginx.conf:119
centos7.6 安装python3.执行/configure时,gcc异常
安装python时,执行./configure初始编译,报gcc没有工作: 错误信息: ``` checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for python3.6... no checking for python3... no checking for python... python checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... linux checking for --without-gcc... no checking for --with-icc... no checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/opt/Python-3.6.0': configure: error: C compiler cannot create executables ``` config.log信息: ![图片说明](https://img-ask.csdn.net/upload/201909/09/1568015863_225982.png) 去看日志发现ld找不到 执行which ld确实找不到。 ![图片说明](https://img-ask.csdn.net/upload/201909/09/1568015884_257870.png) 去搜索资料,都说安装gcc即可,可是我已经把python所需的依赖全部安装了,c编译器还是没有工作,我想可能是ld问题,我在安装pydoop时也遇到ld问题,很头疼,求解!!!
用Ubuntu16.04编译iDT算法(c++)时报错:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':(.text+0x20): undefined reference to `main'
最近在学习iDT算法,刚刚接触Ubuntu也刚刚接触c++,很多东西不是很懂,请教各位: 我在编译iDT算法的时候,需要依赖opencv和ffmpeg两个库,我安装成功并且确保这两个库能用之后,去编译iDT算法,'make'之后报错: ![图片说明](https://img-ask.csdn.net/upload/202001/10/1578648835_846854.png) 查过资料,有的人说是缺少main函数,但是我确保.cpp文件里是有main函数的。 也有帖子说是crt1.o文件的问题,也有帖子说是动态库的问题,现在很迷茫,不知道问题出在哪里,希望各位能够帮助我,万分感谢。 同时为了方便各位帮我找到问题,我上一下我的makefile文件以及Opencv和ffmpeg的安装信息。 Makefile文件 ``` # set the binaries that have to be built TARGETS := DenseTrack Video # set the build configuration set BUILD := release #BUILD := debug # set bin and build dirs BUILDDIR := .build_$(BUILD) BINDIR := $(BUILD) # libraries LDLIBS = $(addprefix -l, $(LIBS) $(LIBS_$(notdir $*))) LIBS := \ opencv_core opencv_highgui opencv_video opencv_imgproc \ avformat avdevice avutil avcodec swscale # set some flags and compiler/linker specific commands CXXFLAGS = -pipe -D __STDC_CONSTANT_MACROS -D STD=std -Wall $(CXXFLAGS_$(BUILD)) -I. -I/opt/include CXXFLAGS_debug := -ggdb CXXFLAGS_release := -O3 -DNDEBUG -ggdb LDFLAGS = -L/opt/lib -pipe -Wall $(LDFLAGS_$(BUILD)) LDFLAGS_debug := -ggdb LDFLAGS_release := -O3 -ggdb include make/generic.mk ``` 下面是opencv和ffmpeg的安装信息: ffmpeg: ![图片说明](https://img-ask.csdn.net/upload/202001/10/1578649174_591798.png) opencv: ![图片说明](https://img-ask.csdn.net/upload/202001/10/1578649330_643110.png) 恳请各位帮忙!!(小弟没有金币,没办法给悬赏,还请各位见谅!)
tinyos 2.x编译问题 大概是说gcc 命令选项错误
我在cygwin中编译tinyos的程序出现如下错误,不知道应该怎么解决。 $ make null mkdir -p build/null compiling BlinkAppC to a null binary ncc -o build/null/main.exe -Os -finline-limit=100000 -Wall -Wshadow -fnesc-gcc=gcc -Wnesc-all -target=null -fnesc-cfile=build/null/app.c -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"fteworld\" -DIDENT_HOSTNAME=\"fteworld-PC\" -DIDENT_USERHASH=0x5abe572eL -DIDENT_TIMESTAMP=0x523d8ddaL -DIDENT_UIDHASH=0xcadb3341L BlinkAppC.nc -lm gcc: 错误:unrecognized command line option ‘-_fnesc-gcc=gcc’ gcc: 错误:unrecognized command line option ‘-_fnesc-include=nesc_nx’ gcc: 错误:unrecognized command line option ‘-_fnesc-include=tos’ gcc: 错误:unrecognized command line option ‘-_fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask’ gcc: 错误:unrecognized command line option ‘-_fnesc-gcc=gcc’ gcc: 错误:unrecognized command line option ‘-_Wnesc-all’ gcc: 错误:unrecognized command line option ‘-_fnesc-cfile=build/null/app.c’ gcc: 错误:unrecognized command line option ‘-_fnesc-target=pc’ gcc: 错误:unrecognized command line option ‘-_fnesc-no-debug’ /opt/tinyos-2_1_2/support/make/null/null.rules:70: recipe for target `exe0' failed make: *** [exe0] Error 1
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
此博客仅为我业余记录文章所用,发布到此,仅供网友阅读参考,如有侵权,请通知我,我会删掉。 补充 有不少读者留言说本文章没有用,因为天气预报直接打开手机就可以收到了,为何要多此一举发送到邮箱呢!!!那我在这里只能说:因为你没用,所以你没用!!! 这里主要介绍的是思路,不是天气预报!不是天气预报!!不是天气预报!!!天气预报只是用于举例。请各位不要再刚了!!! 下面是我会用到的两个场景: 每日下
面试官问我:什么是消息队列?什么场景需要他?用了会出现什么问题?
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸,打败了无数
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观
MyBatis研习录(01)——MyBatis概述与入门
C语言自学完备手册(33篇) Android多分辨率适配框架 JavaWeb核心技术系列教程 HTML5前端开发实战系列教程 MySQL数据库实操教程(35篇图文版) 推翻自己和过往——自定义View系列教程(10篇) 走出思维困境,踏上精进之路——Android开发进阶精华录 讲给Android程序员看的前端系列教程(40集免费视频教程+源码) 版权声明 本文原创作者:谷哥的小弟 作者博客
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/ 
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
你知道的越多,你不知道的越多 点赞再看,养成习惯 本文 GitHub https://github.com/JavaFamily 已收录,有一线大厂面试点思维导图,也整理了很多我的文档,欢迎Star和完善,大家面试可以参照考点复习,希望我们一起有点东西。 前前言 为啥今天有个前前言呢? 因为你们的丙丙啊,昨天有牌面了哟,直接被微信官方推荐,知乎推荐,也就仅仅是还行吧(心里乐开花)
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca
Python爬虫精简步骤1 获取数据
爬虫的工作分为四步: 1.获取数据。爬虫程序会根据我们提供的网址,向服务器发起请求,然后返回数据。 2.解析数据。爬虫程序会把服务器返回的数据解析成我们能读懂的格式。 3.提取数据。爬虫程序再从中提取出我们需要的数据。 4.储存数据。爬虫程序把这些有用的数据保存起来,便于你日后的使用和分析。 这一篇的内容就是:获取数据。 首先,我们将会利用一个强大的库——requests来获取数据。 在电脑上安装
Python绘图,圣诞树,花,爱心 | Turtle篇
1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle() circle.shape('circle') circle.color('red') circle.speed('fastest') circle.up() square = turtle.Turtle()
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东
破14亿,Python分析我国存在哪些人口危机!
2020年1月17日,国家统计局发布了2019年国民经济报告,报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏,但是很多人并没有看到我国复杂的人口问题:老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧! 更多有趣分析教程,扫描下方二维码关注vx公号「裸睡的猪」 即可查看! 一、背景 1.人口突破14亿 2020年1月17日,国家统计局发布
web前端javascript+jquery知识点总结
Javascript javascript 在前端网页中占有非常重要的地位,可以用于验证表单,制作特效等功能,它是一种描述语言,也是一种基于对象(Object)和事件驱动并具有安全性的脚本语言 ,语法同java类似,是一种解释性语言,边执行边解释。 JavaScript的组成: ECMAScipt 用于描述: 语法,变量和数据类型,运算符,逻辑控制语句,关键字保留字,对象。 浏览器对象模型(Br
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
文章目录1. 前言2. 数据下载3. 数据处理4. 数据可视化 1. 前言 今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。 2月6日追记:本文发布后,腾讯的数据源多次变更u
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ......
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!
渗透测试-灰鸽子远控木马
木马概述 灰鸽子( Huigezi),原本该软件适用于公司和家庭管理,其功能十分强大,不但能监视摄像头、键盘记录、监控桌面、文件操作等。还提供了黑客专用功能,如:伪装系统图标、随意更换启动项名称和表述、随意更换端口、运行后自删除、毫无提示安装等,并采用反弹链接这种缺陷设计,使得使用者拥有最高权限,一经破解即无法控制。最终导致被黑客恶意使用。原作者的灰鸽子被定义为是一款集多种控制方式于一体的木马程序
Python:爬取疫情每日数据
前言 有部分同学留言说为什么412,这是因为我代码里全国的cookies需要你自己打开浏览器更新好后替换,而且这个cookies大概只能持续20秒左右! 另外全国卫健委的数据格式一直在变,也有可能会导致爬取失败! 我现在已根据2月14日最新通报稿的格式修正了! 目前每天各大平台,如腾讯、今日头条都会更新疫情每日数据,他们的数据源都是一样的,主要都是通过各地的卫健委官网通报。 为什么已经有大量平台做
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。   再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。   下文是原回答,希望能对你能有所启发。   如果我说,这个世界上人真的分三六九等,
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合
雷火神山直播超两亿,Web播放器事件监听是怎么实现的?
Web播放器解决了在手机浏览器和PC浏览器上播放音视频数据的问题,让视音频内容可以不依赖用户安装App,就能进行播放以及在社交平台进行传播。在视频业务大数据平台中,播放数据的统计分析非常重要,所以Web播放器在使用过程中,需要对其内部的数据进行收集并上报至服务端,此时,就需要对发生在其内部的一些播放行为进行事件监听。 那么Web播放器事件监听是怎么实现的呢? 01 监听事件明细表 名
3万字总结,Mysql优化之精髓
本文知识点较多,篇幅较长,请耐心学习 MySQL已经成为时下关系型数据库产品的中坚力量,备受互联网大厂的青睐,出门面试想进BAT,想拿高工资,不会点MySQL优化知识,拿offer的成功率会大大下降。 为什么要优化 系统的吞吐量瓶颈往往出现在数据库的访问速度上 随着应用程序的运行,数据库的中的数据会越来越多,处理时间会相应变慢 数据是存放在磁盘上的,读写速度无法和内存相比 如何优化 设计
Python新型冠状病毒疫情数据自动爬取+统计+发送报告+数据屏幕(三)发送篇
今天介绍的项目是使用 Itchat 发送统计报告 项目功能设计: 定时爬取疫情数据存入Mysql 进行数据分析制作疫情报告 使用itchat给亲人朋友发送分析报告(本文) 基于Django做数据屏幕 使用Tableau做数据分析 来看看最终效果 目前已经完成,预计2月12日前更新 使用 itchat 发送数据统计报告 itchat 是一个基于 web微信的一个框架,但微信官方并不允
作为程序员的我,大学四年一直自学,全靠这些实用工具和学习网站!
我本人因为高中沉迷于爱情,导致学业荒废,后来高考,毫无疑问进入了一所普普通通的大学,实在惭愧...... 我又是那么好强,现在学历不行,没办法改变的事情了,所以,进入大学开始,我就下定决心,一定要让自己掌握更多的技能,尤其选择了计算机这个行业,一定要多学习技术。 在进入大学学习不久后,我就认清了一个现实:我这个大学的整体教学质量和学习风气,真的一言难尽,懂的人自然知道怎么回事? 怎么办?我该如何更好的提升
粒子群算法求解物流配送路线问题(python)
粒子群算法求解物流配送路线问题(python) 1.查找论文文献 找一篇物流配送路径优化+粒子群算法求解的论文 参考文献:基于混沌粒子群算法的物流配送路径优化 2.了解粒子群算法的原理 讲解通俗易懂,有数学实例的博文:https://blog.csdn.net/daaikuaichuan/article/details/81382794 3.确定编码方式和解码策略 3.1编码方式 物流配送路线的
教你如何编写第一个简单的爬虫
很多人知道爬虫,也很想利用爬虫去爬取自己想要的数据,那么爬虫到底怎么用呢?今天就教大家编写一个简单的爬虫。 下面以爬取笔者的个人博客网站为例获取第一篇文章的标题名称,教大家学会一个简单的爬虫。 第一步:获取页面 #!/usr/bin/python # coding: utf-8 import requests #引入包requests link = "http://www.santostang.
前端JS初级面试题二 (。•ˇ‸ˇ•。)老铁们!快来瞧瞧自己都会了么
1. 传统事件绑定和符合W3C标准的事件绑定有什么区别? 传统事件绑定 &lt;div onclick=""&gt;123&lt;/div&gt; div1.onclick = function(){}; &lt;button onmouseover=""&gt;&lt;/button&gt; 注意: 如果给同一个元素绑定了两次或多次相同类型的事件,那么后面的绑定会覆盖前面的绑定 (不支持DOM事...
相关热词 c#开发的dll注册 c#的反射 c# grid绑定数据源 c#多线程怎么循环 c# 鼠标左键 c# char占位符 c# 日期比较 c#16进制转换为int c#用递归求顺序表中最大 c#小型erp源代码
立即提问