看到有些Ubuntu相关的Dockerfile里写的 rm -rf /var/lib/apt/lists/* 就什么意思 5C

/var/lib/apt/lists/* 这个目录下的都是些什么文件,为什么每次新建Dockerfile都要删除呢?

1个回答

主要是减少最终镜像的大小。通常是可以减少21M以上。

官方文档对此有描述:

In addition, when you clean up the apt cache by removing /var/lib/apt/lists it reduces the image size, since the apt cache is not stored in a layer. Since the RUN statement starts with apt-get update, the package cache is always refreshed prior to apt-get install.

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#general-guidelines-and-recommendations

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ubuntu postgresql如何卸载干净
按照百度卸载postgresql apt-get --purge remove postgresql\* rm -r /etc/postgresql/ rm -r /etc/postgresql-common/ rm -r /var/lib/postgresql/ userdel -r postgres groupdel postgres 之前安装的是postgresql 10版本的后来安装postgresql 9.6版本 如此才能清理干净postgresql呢? 下面是查找还有文件没有删除 lst@lst:~$ pg_config --pkglibdir /usr/lib/postgresql/10/lib lst@lst:~$
用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) 恳请各位帮忙!!(小弟没有金币,没办法给悬赏,还请各位见谅!)
Dockerfile中的权限问题
参考这篇博客[Running GUI apps with Docker](http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/),试图使用dockerfile构建一个可以运行一个编译安装的gui程序,执行到`RUN chmod +x configure`时报错 ``` chmod: cannot access 'configure': Permission denied ``` Dockerfile文件如下 ``` FROM ubuntu:14.04 ENV DEBIAN_FRONTEND noninteractive RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak RUN sed -i s:/archive.ubuntu.com:/mirrors.aliyun.com/ubuntu:g /etc/apt/sources.list RUN cat /etc/apt/sources.list RUN apt-get clean RUN apt-get update --fix-missing RUN apt-get install -y --no-install-recommends --allow-unauthenticated \ freeglut3-dev libplib-dev libopenal-dev libalut-dev \ libvorbis-dev libxi-dev libxmu-dev libxrender-dev libxrandr-dev \ libxrandr-dev build-essential libpng-dev libopencv-dev \ && apt-get autoclean \ && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* RUN export uid=1000 gid=1000 && \ mkdir -p /home/developer && \ echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ echo "developer:x:${uid}:" >> /etc/group && \ echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ chmod 0440 /etc/sudoers.d/developer && \ chown ${uid}:${gid} -R /home/developer USER developer ADD image / WORKDIR /home/developer/project/src/torcs RUN chmod +x configure RUN ./configure --prefix=/home/developer/project/install -enable-debug --enable-profiler RUN make RUN make install RUN make datainstall ENV HOME /home/developer CMD /home/developer/project/install/bin/torcs ```
Linux QT halcon 动态库配置问题
# 环境说明: ubuntu 18.04 QT 5.12.0 Halcon 18.11.1 # QT PRO文件配置如下: ``` #includes INCLUDEPATH += /opt/halcon/include \ INCLUDEPATH += /opt/halcon/include/halconcpp \ #lib LIBS += -L/opt/halcon/lib/x64-linux/ -lhalcon LIBS += -L/opt/halcon/lib/x64-linux/ -lhalconc LIBS += -L/opt/halcon/lib/x64-linux/ -lhalconcpp LIBS += -L/opt/halcon/lib/x64-linux/ -lhalconcppxl LIBS += -L/opt/halcon/lib/x64-linux/ -lhalconcxl LIBS += -L/opt/halcon/lib/x64-linux/ -lhalconxl LIBS += -L/opt/halcon/lib/x64-linux/ -lhdevenginecpp LIBS += -L/opt/halcon/lib/x64-linux/ -lhdevenginecppxl ``` # DEBUG 报错: error while loading shared libraries: libhalconcppxl.so.18.11.1: cannot open shared object file: No such file or directory # 另一种方法: 项目---右键---添加库---选择.so,依次添加,但结果还是一样。
ubuntu12.04下 opencv库交叉编译后 动态库找不到
ubuntu上我装了pc 和arm 两个版本的opencv2.4.9 目录分别是/usr/local/opencv2.4.9 和/opt/opencv2.4.9-for-arm pc版本的库文件都在/usr/local/lib下 arm版本库文件在/opt/opencv2.4.9-for-arm/lib下 whereis libopencv___core 的时候,只列出的/usr/local/lib/libopencv_core.so 交叉编译器在/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin下 我写一个opencv测试程序test.cpp 交叉编译出现警告 ``` # arm-linux-g++ -o test test.cpp -I /opt/opencv2.4.9-for-arm/lib/include -L /opt/opencv2.4.9-for-arm/lib -lopencv_core -lopencv_highgui -lpthread -lrt In file included from /opt/opencv2.4.9-for-arm/lib/include/opencv2/flann/kmeans_index.h:50:0, from /opt/opencv2.4.9-for-arm/lib/include/opencv2/flann/all_indices.h:38, from /opt/opencv2.4.9-for-arm/lib/include/opencv2/flann/flann_base.hpp:44, from /opt/opencv2.4.9-for-arm/lib/include/opencv2/flann/flann.hpp:50, from /opt/opencv2.4.9-for-arm/lib/include/opencv/cv.h:69, from test.cpp:2: /opt/opencv2.4.9-for-arm/lib/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4 /opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_core.so, needed by /opt/opencv2.4.9-for-arm/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link) /opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_imgproc.so, needed by /opt/opencv2.4.9-for-arm/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link) root@tsie-All-Series:/home/tsie/nfs/test/opencv_test# whereis libopencv_core libopencv_core: /usr/local/lib/libopencv_core.so ``` 这里面好像用到交叉编译器的ld,找opencv的.so文件看提示是跑到交叉编译器所在文件夹里面的lib去找?? 我也吧opencv的交叉库放到这个文件夹里面,再编译还是同样的问题 然后我尝试加上运行时库路径参数 -Wl,-rpath,/opt/opencv2.4.9-for-arm/lib,再编译,弹出来一样的信息。 然后,就没有然后了。我晕 这究竟谁什么问题啊 求各路大神给点思路
ubuntu下NS3使用“./test.py -c core”命令测试一直报错,求大神帮忙
Build failed -> task in 'test-runner' failed (exit status 1): {task 140009040312272: cxx test-runner.cc -> test-runner.cc.1.o} ['/usr/bin/g++', '-O3', '-g', '-Wall', '-Werror', '-march=native', '-fstrict-overflow', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-DNS3_BUILD_PROFILE_OPTIMIZED', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '../utils/test-runner.cc', '-c', '-o', '/home/chenhl/ns-allinone-3.25/ns-3.25/build/utils/test-runner.cc.1.o'] Waf died. Not running tests
在Ubuntu下装ns-3,编译时总是中途出错,具体如下:
Build failed -> task failed (exit status 1): {task 139621304904464: cxx print-introspected-doxygen.cc -> print-introspected-doxygen.cc.4.o} ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-fno-strict-aliasing', '-fwrapv', '-fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=.', '-fstack-protector-strong', '-fno-strict-aliasing', '-Ibuild', '-I.', '-I.', '-I/home/zhangzq/tarballs/ns-allinone-3.13', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/libpng16', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-I/usr/include/python2.7', '-I/usr/include/x86_64-linux-gnu/python2.7', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DPYTHONDIR="/usr/local/lib/python2.7/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python2.7/dist-packages"', '-DHAVE_PYTHON_H=1', '-DENABLE_GSL', '-DNDEBUG', '-D_FORTIFY_SOURCE=2', '../utils/print-introspected-doxygen.cc', '-c', '-o', 'utils/print-introspected-doxygen.cc.4.o'] Traceback (most recent call last): File "./build.py", line 147, in <module> sys.exit(main(sys.argv)) File "./build.py", line 138, in main build_ns3(config, build_examples, build_tests, args, build_options) File "./build.py", line 61, in build_ns3 run_command([sys.executable, "waf", "build"] + build_options) File "/home/zhangzq/tarballs/ns-allinone-3.13/util.py", line 24, in run_command raise CommandError("Command %r exited with code %i" % (argv, retval)) util.CommandError: Command ['/usr/bin/python', 'waf', 'build'] exited with code 1
Ubuntu 输入 apt-get update , 产生Hash Sum mismatch
[root]$ sudo apt-get update W: Failed to fetch http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/dists/trusty/main/binary-i386/Packages Hash Sum mismatch W: Failed to fetch http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/dists/trusty/main/i18n/Translation-en Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead.
Ubuntu启动 eclipse 失败 JVM terminated. Exit code=13
错误码: JVM terminated. Exit code=13 /usr/java/jdk1.8.0_20/bin/java -Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -os linux -ws gtk -arch x86_64 -showsplash /opt/eclipse//plugins/org.eclipse.platform_4.5.0.v20150603-2000/splash.bmp -launcher /opt/eclipse/eclipse -name Eclipse --launcher.library /opt/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417/eclipse_1612.so -startup /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar --launcher.appendVmargs -exitdata 33800f -product org.eclipse.epp.package.jee.product -vm /usr/java/jdk1.8.0_20/bin/java -vmargs -Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar jdk和eclipse均为64位..系统为Ubuntu 15.04
ubuntu 19.04 遇到了libpng12.so.0 导致无法apt 更新
我用的是ubuntu 19.04 遇到了libpng12.so.0 的问题 ``` sudo dpkg -i libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (正在读取数据库 ... 系统当前共安装有 176372 个文件和目录。) 准备解压 libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ... 正在解压 libpng12-0:amd64 (1.2.54-1ubuntu1.1) ... dpkg: 处理归档 libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (--install)时出错: 无法安装 /lib/x86_64-linux-gnu/libpng12.so.0 的新版本: 没有那个文件或目录 正在处理用于 libc-bin (2.29-0ubuntu2) 的触发器 ... 在处理时有错误发生: libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ``` 于是我便下载了一下个 ``` sudo cp out/lib/x86_64-linux-gnu/libpng12.so.0 /lib/x86_64-linux-gnu/ ``` 确定目录下面有 ``` ls -alh /lib/x86_64-linux-gnu/libpng1* -rw-r--r-- 1 root root 147K Oct 10 13:56 /lib/x86_64-linux-gnu/libpng12.so.0 lrwxrwxrwx 1 root root 19 Jul 30 01:29 /lib/x86_64-linux-gnu/libpng16.so.16 -> libpng16.so.16.36.0 -rw-r--r-- 1 root root 214K Apr 8 2019 /lib/x86_64-linux-gnu/libpng16.so.16.36.0 ``` 然后我再运行 ``` sudo apt --fix-broken install 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 正在修复依赖关系... 完成 将会同时安装下列软件: libpng12-0 下列【新】软件包将被安装: libpng12-0 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。 有 3 个软件包没有被完全安装或卸载。 需要下载 0 B/118 kB 的归档。 解压缩后会消耗 313 kB 的额外空间。 您希望继续执行吗? [Y/n] y (正在读取数据库 ... 系统当前共安装有 176372 个文件和目录。) 准备解压 .../libpng12-0_1.2.50-1ubuntu2.14.04.3_amd64.deb ... 正在解压 libpng12-0:amd64 (1.2.50-1ubuntu2.14.04.3) ... dpkg: 处理归档 /var/cache/apt/archives/libpng12-0_1.2.50-1ubuntu2.14.04.3_amd64.deb (--unpack)时出错: 无法安装 /lib/x86_64-linux-gnu/libpng12.so.0 的新版本: 没有那个文件或目录 错误信息显示本地系统有一些问题,因此没有写入 apport 报告 在处理时有错误发生: /var/cache/apt/archives/libpng12-0_1.2.50-1ubuntu2.14.04.3_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) ``` 然后还是报了没有 /lib/x86_64-linux-gnu/libpng12.so.0 这个文件 然后我就不知道为什么会被自动删除 > ``` ls -alh /lib/x86_64-linux-gnu/libpng1* lrwxrwxrwx 1 root root 19 Jul 30 01:29 /lib/x86_64-linux-gnu/libpng16.so.16 -> libpng16.so.16.36.0 -rw-r--r-- 1 root root 214K Apr 8 2019 /lib/x86_64-linux-gnu/libpng16.so.16.36.0 ``` 这是服务端的信息 ``` uname -a Linux itanzi-OptiPlex-7060 5.0.0-21-generic #22-Ubuntu SMP Tue Jul 2 13:27:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 19.04 Release: 19.04 Codename: disco ```
PX4编译问题,编译出错
尝试PX4编译时出错,error详见下图![图片说明](https://img-ask.csdn.net/upload/201904/14/1555209635_624299.png) 之前一直有GCC和G++的问题,安装了最新版本的GCC工具链后之前的问题解决了,产生了新的问题 具体代码: [2/655] Generating nuttx/include/nuttx/version.h, nuttx/include/nuttx/config.h FAILED: cd /home/hu/src/Firmware/build/px4_fmu-v2_default/NuttX/nuttx && make --quiet --no-print-directory CONFIG_ARCH_BOARD_CUSTOM=y context > nuttx_context.log /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit': exit.c:(.text.exit+0x2c): undefined reference to `_exit' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): in function `_fstat_r': fstatr.c:(.text._fstat_r+0x20): undefined reference to `_fstat' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): in function `_open_r': openr.c:(.text._open_r+0x24): undefined reference to `_open' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): in function `_write_r': writer.c:(.text._write_r+0x24): undefined reference to `_write' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): in function `_close_r': closer.c:(.text._close_r+0x18): undefined reference to `_close' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): in function `_isatty_r': isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): in function `_lseek_r': lseekr.c:(.text._lseek_r+0x24): undefined reference to `_lseek' /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /usr/bin/gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): in function `_read_r': readr.c:(.text._read_r+0x24): undefined reference to `_read' collect2: error: ld returned 1 exit status make[3]: *** [mkconfig] Error 1 make[2]: *** [tools/mkconfig] Error 2 FAILED: cd /home/hu/src/Firmware/build/px4_fmu-v2_default/external/Build/px4io_firmware && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/hu/src/Firmware/build/px4_fmu-v2_default/external/Stamp/px4io_firmware/px4io_firmware-build ninja: build stopped: subcommand failed. Makefile:190: recipe for target 'px4_fmu-v2_default' failed make[1]: *** [px4_fmu-v2_default] Error 1 make[1]: Leaving directory '/home/hu/src/Firmware' Makefile:212: recipe for target 'px4fmu-v2_default' failed make: *** [px4fmu-v2_default] Error 2
Tensorflow 源码构建 error executing command 错误
Ubuntu 16.04 通过源码安装tensorflow GPU版本。执行如下命令时出错,请各位帮忙分析下。 OS:Linux aikou 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux GCC:gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) CUDA:9.0 cuDNN: 5.1.10 执行命令: bazel build --copt=-march=native --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both ––verbose_failures --spawn_strategy=standalone --config=cuda //tensorflow/tools/pip_package:build_pip_package 错误提示: ERROR: /home/kou/tensorflow/tensorflow/stream_executor/BUILD:52:1: C++ compilation of rule '//tensorflow/stream_executor:cuda_platform' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command (cd /home/kou/.cache/bazel/_bazel_kou/3f3a4712723b62ae321569eb62995c39/execroot/org_tensorflow && \ exec env - \ LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda/extras/CUPTI/lib64 \ PATH=/home/kou/anaconda3/bin:/home/kou/bin:/home/kou/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-9.0/bin \ PWD=/proc/self/cwd \ external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++11' -g0 -MD -MF bazel-out/host/bin/tensorflow/stream_executor/_objs/cuda_platform/tensorflow/stream_executor/cuda/cuda_dnn.pic.d '-frandom-seed=bazel-out/host/bin/tensorflow/stream_executor/_objs/cuda_platform/tensorflow/stream_executor/cuda/cuda_dnn.pic.o' -fPIC -DEIGEN_MPL2_ONLY -DTENSORFLOW_USE_JEMALLOC -DTF_USE_SNAPPY -iquote . -iquote bazel-out/host/genfiles -iquote external/nsync -iquote bazel-out/host/genfiles/external/nsync -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -iquote external/jemalloc -iquote bazel-out/host/genfiles/external/jemalloc -iquote external/eigen_archive -iquote bazel-out/host/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/host/genfiles/external/local_config_sycl -iquote external/gif_archive -iquote bazel-out/host/genfiles/external/gif_archive -iquote external/jpeg -iquote bazel-out/host/genfiles/external/jpeg -iquote external/protobuf_archive -iquote bazel-out/host/genfiles/external/protobuf_archive -iquote external/com_googlesource_code_re2 -iquote bazel-out/host/genfiles/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/host/genfiles/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/host/genfiles/external/fft2d -iquote external/highwayhash -iquote bazel-out/host/genfiles/external/highwayhash -iquote external/png_archive -iquote bazel-out/host/genfiles/external/png_archive -iquote external/zlib_archive -iquote bazel-out/host/genfiles/external/zlib_archive -iquote external/local_config_cuda -iquote bazel-out/host/genfiles/external/local_config_cuda -isystem external/nsync/public -isystem bazel-out/host/genfiles/external/nsync/public -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jemalloc/include -isystem bazel-out/host/genfiles/external/jemalloc/include -isystem external/eigen_archive -isystem bazel-out/host/genfiles/external/eigen_archive -isystem external/gif_archive/lib -isystem bazel-out/host/genfiles/external/gif_archive/lib -isystem external/protobuf_archive/src -isystem bazel-out/host/genfiles/external/protobuf_archive/src -isystem external/farmhash_archive/src -isystem bazel-out/host/genfiles/external/farmhash_archive/src -isystem external/png_archive -isystem bazel-out/host/genfiles/external/png_archive -isystem external/zlib_archive -isystem bazel-out/host/genfiles/external/zlib_archive -isystem external/local_config_cuda/cuda -isystem bazel-out/host/genfiles/external/local_config_cuda/cuda -isystem external/local_config_cuda/cuda/cuda/include -isystem bazel-out/host/genfiles/external/local_config_cuda/cuda/cuda/include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c tensorflow/stream_executor/cuda/cuda_dnn.cc -o bazel-out/host/bin/tensorflow/stream_executor/_objs/cuda_platform/tensorflow/stream_executor/cuda/cuda_dnn.pic.o)
ubuntu14.04 32位 编译展讯8810平台版本amixer.c的问题
看第一条error是说没有找到 alsa/asoundlib.h头文件,但是从别的文件夹拷贝过来放在alsa下编译还是出现同样的错误 请大神帮忙分析下是什么原因?谢谢 external/sprd/alsa/alsa-utils/amixer/amixer.c:30:28: error: alsa/asoundlib.h: No such file or directory external/sprd/alsa/alsa-utils/amixer/amixer.c: In function 'info': external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: 'snd_ctl_t' undeclared (first use in this function) external/sprd/alsa/alsa-utils/amiexternal/sprd/alsa/alsa-utils/amixer/amixer.c:30:28: error: alsa/asoundlib.h: No such file or directory external/sprd/alsa/alsa-utils/amixer/amixer.c: In function 'info': external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: 'snd_ctl_t' undeclared (first use in this function) external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: (Each undeclared identifier is reported only once external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: for each function it appears in.) external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: 'handle' undeclared (first use in this function) external/sprd/alsa/alsa-utils/amixer/amixer.c:87: error: 'snd_mixer_t' undeclared (first use in this function) external/sprd/alsa/alsa-utils/amixer/amixer.c:87: error: 'mhandle' undeclared (first use in this function)xer/amixer.c:86: error: (Each undeclared identifier is reported only once external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: for each function it appears in.) external/sprd/alsa/alsa-utils/amixer/amixer.c:86: error: 'handle' undeclared (first use in this function) external/sprd/alsa/alsa-utils/amixer/amixer.c:87: error: 'snd_mixer_t' undeclared (first use in this function) external/sprd/alsa/alsa-utils/amixer/amixer.c:87: error: 'mhandle' undeclared (first use in this function) 省略。。。。。
ubuntu18.04执行apt-get install xxx命令时报错
**ubuntu18.04执行apt-get install xxx命令时报错** ``` E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success ```
speex 在Linux 上面的编译和移植
1. 本人在官网上下载了speex的源码:speex-1.2.0.tar ,想要编译出库文件给其他工程使用。编译的时候遇到些问题。 2. 解压后操作如下: ./configure --host=arm-fsl-linux-gnueabi CC=arm-fsl-linux-gnueabi-gcc --enable-static --enable-shared make 3. 编译完了并没有生成库文件,但是也没报错。 eyelake@ubuntu:~/eyelake-workdir/speex/speex-1.2.0$ make 希望懂的人指明下思路,多谢。 编译结果如下: make all-recursive make[1]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0' Making all in libspeex make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/libspeex' CC cb_search.lo CC filters.lo CC lsp.lo CC ltp.lo CC speex.lo CC stereo.lo CC vbr.lo CC vq.lo CC bits.lo CC lpc.lo CC modes.lo CC modes_wb.lo CC nb_celp.lo CC quant_lsp.lo CC sb_celp.lo CC speex_callbacks.lo CC speex_header.lo CC window.lo CCLD libspeex.la make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/libspeex' Making all in include make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/include' Making all in speex make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/include/speex' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/include/speex' make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/include' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/include' make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/include' Making all in doc make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/doc' Making all in win32 make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32' Making all in libspeex make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/libspeex' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/libspeex' Making all in speexenc make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/speexenc' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/speexenc' Making all in speexdec make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/speexdec' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/speexdec' Making all in VS2003 make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003' Making all in libspeex make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/libspeex' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/libspeex' Making all in speexenc make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/speexenc' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/speexenc' Making all in speexdec make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/speexdec' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/speexdec' Making all in tests make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/tests' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003/tests' make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003' make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2003' Making all in VS2005 make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005' Making all in libspeex make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/libspeex' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/libspeex' Making all in speexenc make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/speexenc' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/speexenc' Making all in speexdec make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/speexdec' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/speexdec' Making all in tests make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/tests' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005/tests' make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005' make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2005' Making all in VS2008 make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008' Making all in libspeex make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/libspeex' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/libspeex' Making all in speexenc make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/speexenc' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/speexenc' Making all in speexdec make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/speexdec' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/speexdec' Making all in tests make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/tests' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008/tests' make[4]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008' make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32/VS2008' make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32' make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/win32' Making all in symbian make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/symbian' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/symbian' Making all in ti make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti' Making all in speex_C54_test make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti/speex_C54_test' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti/speex_C54_test' Making all in speex_C55_test make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti/speex_C55_test' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti/speex_C55_test' Making all in speex_C64_test make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti/speex_C64_test' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti/speex_C64_test' make[3]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti' make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0/ti' make[2]: Entering directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0' make[2]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0' make[1]: Leaving directory `/home/eyelake/eyelake-workdir/speex/speex-1.2.0'
交叉编译应用程序无法运行 arm-oe-linux-gnueabi-gcc: not found
Ubuntu交叉编译的应用程序在Qualcomm 9615 A5核的Linux系统下面无法运行, 出错信息如下 /usr/bin/qmi_ping_clnt_test_0000: cd: line 1: can't cd to /home/qualcomm/nelson/ apps_proc/oe-core/build/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/qmi-fra mework-git-r3/qmi-framework/qcci/test /usr/bin/qmi_ping_clnt_test_0000: eval: line 1: arm-oe-linux-gnueabi-gcc: not fo undn/usr/bin #
各位朋友好,请教ubuntu系统python3.4环境下安装matplotlib报错的解决办法
具体的问题是这样的: 我的系统是Ubuntu14.04 的64位系统,python3.4版本下,想使用matplotlib来做图。 由于matplotlib依赖numpy和python的图像库PIL,因此我先安装numpy和PIL然后,再安装matplotlib, 这里附上我的安装matplotlib的shell命令 #安装科学计算库numpy sudo pip3 install numpy #安装图像处理库PIL sudo apt-get install python3.4-dev -y sudo apt-get install libjpeg8-dev zlib1g-dev libfreetype6-dev -y sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib sudo apt-get install python3-pil #安装画图库matplotlib sudo pip3 install matplotlib 但是发现虽然安装成功(在python3的shell交互环境下, import matplotlib 是可以的),但是 执行如下语句 from matplotlib import pyplot as plt 报错: "/usr/local/lib/python3.4/dist-packages/matplotlib-1.5.1-py3.4-linux-x86_64.egg/matplotlib/backends/backend_gtk3.py", line 58, in <module> cursors.MOVE : Gdk.Cursor.new(Gdk.CursorType.FLEUR), TypeError: constructor returned NULL 希望各位朋友能指点一下,十分感谢
使用tcl8.6共享库,遇到错误提示undefined reference to
项目中用到了tcl8.6的共享库,把tcl的源码下载后在ubuntu上将tcl的库编译出来了。但是在编译项目的时候总是报未定义引用的错误,我检查了自己编译出来的libtcl8.6.so,这个共享库中是有tclStringType的定义的,也检查了声明tclStringType的头文件,编译tcl共享库时的头文件与编译项目时的头文件是一致的。 以下是共享库符号检查和编译的结果,跪求武林高手出手相帮,不胜感激! nm -l /home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686/liboms_shr.so|grep tclStringType U tclStringType nm -l /usr/lib/i386-linux-gnu/libtcl8.6.so|grep tclStringType 001a1034 d tclStringType gcc -g -o /home/water/Documents/eaf/kit/test/bin/Linux_3.19.0_i686/TableDump Linux_3.19.0_i686/TableDump.o -L/home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686 -loms0_shr -L/home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686 -loms_shr -L/home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686 -lstub -L/usr/lib/i386-linux-gnu -ltcl8.6 -L/usr/lib/i386-linux-gnu -lpthread -L/usr/lib/i386-linux-gnu -lresolv -L/usr/lib/i386-linux-gnu -lm -L/usr/lib/i386-linux-gnu -lc -Xlinker --rpath-link -Xlinker /home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686 /home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686/liboms_shr.so: undefined reference to `tclEmptyStringRep' /home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686/liboms_shr.so: undefined reference to `tclStringType' /home/water/Documents/eaf/kit/test/lib/Linux_3.19.0_i686/liboms_shr.so: undefined reference to `tclFreeObjList'
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载 点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。 ...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
【图解经典算法题】如何用一行代码解决约瑟夫环问题
约瑟夫环问题算是很经典的题了,估计大家都听说过,然后我就在一次笔试中遇到了,下面我就用 3 种方法来详细讲解一下这道题,最后一种方法学了之后保证让你可以让你装逼。 问题描述:编号为 1-N 的 N 个士兵围坐在一起形成一个圆圈,从编号为 1 的士兵开始依次报数(1,2,3…这样依次报),数到 m 的 士兵会被杀死出列,之后的士兵再从 1 开始报数。直到最后剩下一士兵,求这个士兵的编号。 1、方...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
GitHub标星近1万:只需5秒音源,这个网络就能实时“克隆”你的声音
作者 | Google团队 译者 | 凯隐 编辑 | Jane 出品 | AI科技大本营(ID:rgznai100) 本文中,Google 团队提出了一种文本语音合成(text to speech)神经系统,能通过少量样本学习到多个不同说话者(speaker)的语音特征,并合成他们的讲话音频。此外,对于训练时网络没有接触过的说话者,也能在不重新训练的情况下,仅通过未知...
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下...
【管理系统课程设计】美少女手把手教你后台管理
【文章后台管理系统】URL设计与建模分析+项目源码+运行界面 栏目管理、文章列表、用户管理、角色管理、权限管理模块(文章最后附有源码) 1. 这是一个什么系统? 1.1 学习后台管理系统的原因 随着时代的变迁,现如今各大云服务平台横空出世,市面上有许多如学生信息系统、图书阅读系统、停车场管理系统等的管理系统,而本人家里就有人在用烟草销售系统,直接在网上完成挑选、购买与提交收货点,方便又快捷。 试想,若没有烟草销售系统,本人家人想要购买烟草,还要独自前往药...
4G EPS 第四代移动通信系统
目录 文章目录目录4G 与 LTE/EPCLTE/EPC 的架构E-UTRANE-UTRAN 协议栈eNodeBEPCMMES-GWP-GWHSSLTE/EPC 协议栈概览 4G 与 LTE/EPC 4G,即第四代移动通信系统,提供了 3G 不能满足的无线网络宽带化,主要提供数据(上网)业务。而 LTE(Long Term Evolution,长期演进技术)是电信领域用于手机及数据终端的高速无线通...
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100)【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的Tencent Kona JDK,分布式HTAP数据库 TBase,企业级容器平台TKEStack,以及高性能图计算框架Plato。短短一周之内,腾讯开源了五大重点项目。其中,TubeMQ是腾讯大数据平台部门应用的核心组件,...
相关热词 c# 图片上传 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd
立即提问