小编Raf*_*eis的帖子

在Ubuntu 16.04上安装OpenCV时出错

我一直试图在Ubuntu 16.04上安装OpenCV unsing几个教程,我总是最终得到一个错误.这是我在本教程后面的最后一个:

https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-OpenCV-3.1-Installation-Guide

我能做什么?

[ 48%] Linking CXX executable ../../bin/opencv_test_viz
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFReadTile@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `_TIFFfree@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFGetField@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFTileSize@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFClose@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFGetFieldDefaulted@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFNumberOfDirectories@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to …
Run Code Online (Sandbox Code Playgroud)

opencv opencv3.1 ubuntu-16.04

11
推荐指数
2
解决办法
7113
查看次数

Django + S3 + Pandas - 如何在 S3 存储桶上保存数据帧?

我正在视图中创建 Pandas DataFrame,需要将其作为 csv 文件保存在我的 S3 存储桶上。我可以正常存储上传的文件,我的问题是在视图中创建文件并存储它们。有人可以帮忙吗?

python django amazon-s3 pandas

5
推荐指数
0
解决办法
255
查看次数

使用 YouTube API,如何从频道名称获取直播流的视频 ID?

我可以通过 3 种方式从频道 /live 访问流:

我知道如何从 channel_id 中获取它,我知道如何从用户名中获取 channel_id。我的问题是第三种情况。是否可以从此自定义 URL 获取 channel_id?

第二个问题。我从频道 ID 获取视频 URL 的方式是使用以下端点:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={CHANNEL_ID}&eventType=live&type=video&key={YOUR_API_KEY}
Run Code Online (Sandbox Code Playgroud)

我注意到,如果频道在 /channel-id/live 上有直播,并且有其他流使用特定的 URL,我不保证我得到的视频 URL 是与 /channel-id 关联的 URL /居住。这是获取此特定视频的方法吗?

youtube video youtube-api live-streaming youtube-data-api

5
推荐指数
1
解决办法
1679
查看次数

Javascript - 如何将图像缩小到特定文件大小?

在将图像上传到服务器之前,我正在对图像进行 Base64 编码。我需要将它们的文件大小降低到特定大小 (500kB)。我试图获得原始文件大小和所需文件大小之间的比率,并相应地减少高度和宽度。但它不起作用。有什么帮助吗?

javascript base64 png jpeg image

4
推荐指数
2
解决办法
1万
查看次数

Ubuntu 14.04 上 PostgreSQL 安装失败

我最近从计算机上卸载了 postgresql。我尝试再次安装它,但遇到了一些问题。我尝试再次完全卸载它,如下所示:我找到了与 postgres 相关的所有软件包:

$ dpkg -l | grep postgres
Run Code Online (Sandbox Code Playgroud)

我删除了所有包和相关文件夹:

$ sudo apt-get --purge remove postgresql postgresql-9.3 postgresql-client-9.3 postgresql-client-common postgresql-common postgresql-contrib-9.3

$ sudo rm -rf /var/lib/postgresql/
$ sudo rm -rf /var/log/postgresql/
$ sudo rm -rf /etc/postgresql/
Run Code Online (Sandbox Code Playgroud)

我尝试再次安装它,但安装后我无法访问postgres用户。

$ sudo apt-get install postgresql postgresql-contrib
$ sudo -i -u postgres
sudo: unable to change directory to /home/postgres: No such file or directory
Run Code Online (Sandbox Code Playgroud)

如果我访问 root,我可以访问 postgres,但会发生这样的情况:

$ sudo su -
$ su - postgres
No directory, logging in with HOME=/
postgres@rafael-pc:/$ psql …
Run Code Online (Sandbox Code Playgroud)

database postgresql postgresql-9.3 ubuntu-14.04

1
推荐指数
1
解决办法
1851
查看次数